[ADMB Users] plotting glmmadmb model error bars

Ben Bolker bbolker at gmail.com
Wed Oct 26 05:37:45 PDT 2011


On 11-10-26 04:55 AM, Mari Jaramillo wrote:
> Hi glmmadmb users,
> I am a new R user, so please excuse if this question is a little dumb.
> Could someone give me a hint on how to plot the standard errors of the
> output of a glmmadmb model (see example output below). Note the variable
> is categorical.

  This is really an R question rather than a glmmADMB question. Further
questions should probably go to an R venue (e.g. the r-help or
r-sig-mixed-models or r-sig-ecology mailing lists, or stack overflow ) ... ?

  The quickest solution is to install the coefplot2 package from r-forge

install.packages("coefplot2",repos="http://r-forge.r-project.org")
library("coefplot2")
coefplot2(model)

  otherwise consider using coef() to extract the coefficients, stdEr()
to extract the standard errors, and any number of R procedures (barplot,
plotCI [plotrix package], barplot2 [gplots package] ...

  Do remember that what you are getting in summary() is not the
estimates of the mean in your three zones, but the estimate of the mean
in the *first* zone (whatever it is), and then the differences between
baseline and arid and baseline and tran.  If you want the estimates by
zone you should use terr2 ~ zone-1 + (1|year) ...


> 
> 
> glmmadmb(formula = terr2 ~ zone + (1 | year), data = data2, family =
> "nbinom",
>    zeroInflation = FALSE)
> 
> 
> Coefficients:
>            Estimate Std. Error z value Pr(>|z|)
> (intercept)   4.576      0.337   13.56  < 2e-16 ***
> arid          1.071      0.265    4.05  5.2e-05 ***
> tran          1.034      0.309    3.35  0.00082 ***
> 
> I'd like to plot a bar graph of the estimates with their corresponding
> std. errors, could anyone give me a hint on how to plot the std. errors
> for each category?
> 
> Any help is appreciated.
> Mari
> 
> 
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users




More information about the Users mailing list