title: Alter fixed and random effects using Fixef and VarCorr in package simr with a ZIP glmmTMB
body: <p>I am trying to alter the fixed and random effects of a zero-inflated Poisson model using R's <code>glmmTMB</code> function. I want to input the altered fixed effects into the <code>powerSim</code> function. Here is the data:</p>
  <pre><code>sample &lt;- as.data.frame(cbind(1:50, (rep(1:10, each = 5))))
  
  #randomize interventions by clinic
  ru1 &lt;- cbind(rbinom(10, 1, 0.5), 1:10)
  ru2 &lt;- cbind(rbinom(10, 1, 0.5), 1:10)
  
  #merge randomization id with original sample 
  sample &lt;- merge(sample, ru1, by = &quot;V2&quot;) %&gt;% merge(ru2)
  
  #add days 
  sample &lt;- as.data.frame(cbind(sample, scale(rep(-546:546, each = 50))))
  
  #order by clinic and prescriber
  sample &lt;- sample[order(sample$V2, sample$V1.x),]
  
  #simulate ZIP distribution for days supply
  set.seed(789)
  sample &lt;- cbind(sample, ifelse(rbinom(54650, 1, p = 0.5) &gt; 0, 0, rpois(54650, 5)))
  
  #rename variables
  sample &lt;- rename(sample, pres = V1.x, clinic = V2, aj = V1.y, def = V1, 
                   days = `scale(rep(-546:546, each = 50))`, 
                   dayssply = `ifelse(rbinom(54650, 1, p = 0.5) &gt; 0, 0, rpois(54650, 5))`)
  
  #days truncated
  sample$days_ &lt;- ifelse(0 &gt; sample$days, 0, sample$days)
  
  #model 
  m1 &lt;- glmmTMB(dayssply ~ aj*days_ + (1|clinic/pres), zi = ~ aj*days_, 
          data = sample, family = poisson) 
  </code></pre>
  <p>After a lot of trial and error, I finally figured out how to specify the conditional fixed effect using the fixef function:</p>
  <pre><code>fixef(m1)$cond [[&quot;aj&quot;]]
  </code></pre>
  <p>But when I try to change it to the desired fixed effect for the power analysis, I get the error that &quot;cond is not the name of a fixed effect.&quot; Not sure if this is a syntax related issue, or if fixef doesn't work for zero-inflated models.</p>
  <p>I would also like to alter the variances for the random effects using VarCorr.</p>