0
$\begingroup$

I am running a GLMM on some data where the response is count data, using the glmmADMD package in R. I would like to plot the results giving estimates for the response variable with certain explanatory variables.

model <- glmmadmb(response ~ var1 + var2 + var3 - 1 + (1|rvar1), 
              data = data1, family = 'nbinom', zeroInflation = FALSE)

When I get my results from the summary() function,

summary(model)
    Coefficients:
         Estimate Std. Error z value Pr(>|z|)    
var1D      -0.744      0.177   -4.21  2.5e-05 ***
var1J      -0.455      0.170   -2.68  0.00745 ** 
var2PI      0.620      0.115    5.41  6.4e-08 ***
var2SO      0.228      0.111    2.05  0.04026 *  
var32016   -0.624      0.169   -3.68  0.00023 ***
var32017   -0.988      0.312   -3.17  0.00153 ** 
var32018   -0.767      0.191   -4.02  5.9e-05 ***
---

I know that I can get a count estimate by reverse transforming my coefficients,

 exp(0.620) #for var2PI

and that I can get a 95% confidence interval by exponentiating two standard deviations in either direction,

exp(0.620 +/- 2*(0.115)) #for var2PI

such that I now have an estimate and a 95% confidence interval with respect to that single variable. To look at multiple coefficients, I know I can simply add the coefficients together to get a count estimate,

exp(0.620 + (-0.624)) #for var2PI and var32016

My question is - how do I achieve a 95% confidence interval for this estimate that of the multiple added coefficients? Do I take an average of the two standard errors? Any help, or a text that explains this would be of great help! I've tried the R book, a few GLMM books (Littell et al 2006, McCulloch et al 2008) to no avail. A citation of where this information could be found officially would be awesome!

$\endgroup$
  • $\begingroup$ look for contrasts() in the car or emmeans package ... $\endgroup$ – Ben Bolker Dec 21 '18 at 20:37
3
$\begingroup$

You will also need to account for the covariance between the two coefficients. You can get the expected along with a 95% confidence interval using the effectPlotData() function of the GLMMadaptive package that can fit the same model.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.