[R-sig-ME] Plotting a glmmADMB model

Luiz Ernesto Costa Schmidt luizernesto at gmail.com
Tue Nov 10 22:35:42 CET 2015


Dear users,
Thanks for your attention. I’m running a glmm model using the glmmadmb function provided in the package glmmADMB.
My dependent variable is the number of individuals belonging to a single species of an aquatic insect, sampled throughout two non-consecutive years. The samples were classified by the following fixed factors:
- year: two levels (2004, 2009);
- hydroperiod (hyd): classified in two levels (high and low flow);
- daytime (time): two levels, night or day;
- stratification (str): two levels, bottom and surface
- water current velocity (vel): quantitative variable used as an offset, since the sampling method is very sensitive for the amount of water filtered, which has a strong correlation with water current velocity.
A single random term was added to the model, named as sampleID, since sampling at the bottom and at the surface were performed at the same moment (as far as understand, the inclusion of such random factor will treta them as a sampling block). I also added two interaction terms (hydroperiod:daytime, hydroperiod:stratification).

The model that I tested was a confirmatory one, based on a very precise biological hypothesis, resulting in the following output:

-----------
glmmadmb(formula = Count ~ year + hyd * (time + str) + offset(vel) + (1 | sampleID),
			family = “nbinom”, zeroInflation = T)

AIC: 1484.1 

Coefficients:
                               Estimate	Std. Error z value	Pr(>|z|)    
(Intercept)		-0.339	0.229	-1.48	0.13756    
year2009			-0.164	0.148	-1.11	0.26852    
hydlow			 0.197	0.259	 0.76	0.44747    
timenight			-0.556	0.254	-2.19	0.02851 *  
strsurf			 0.808	0.215	 3.75	0.00017 ***
hydlow:timenight	 0.709	0.311	 2.28	0.02270 *  
hydlow:strsurf		-0.195	0.263	-0.74	0.45832    
— 
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Number of observations: total=366, sample=183 
Random effect variance(s):
Group=sampleID
            Variance StdDev
(Intercept)   0.2813 0.5304

Negative binomial dispersion parameter: 1.3265 (std. err.: 0.25595)
Zero-inflation: 1.0003e-06  (std. err.:  6.2823e-06 )

Log-likelihood: -732.046 
---------------

One graphical output that I opted to use shows the estimates provided by the model and their respective confidence intervals (I used the coefplot2 function).

Now I’m (desperately) trying to provide a better graphical representation about the predicted values from the model, in order to express graphically the magnitude and direction of variation explained by the model. However, I’m not sure if the data that I should use for such description comes from the following indexation 

model$fitted

or if I could use the command:

plot(interactionMeans(model))

Thank you so much for your attention,

Tchê

-- 
Luiz Ernesto Costa-Schmidt
http://lattes.cnpq.br/1402956553786728 <http://lattes.cnpq.br/1402956553786728>
Pós-doutorando - PNPD/CAPES
Universidade do Vale do Rio dos Sinos - UNISINOS
Programa de Pós-Graduação em Biologia
Avenida Unisinos, 950 - Sala E04 235
CEP 93022-000
São Leopoldo/RS - Brasil
Telefone: +55 51 3590.8477
http://www.unisinos.br/mestrado-e-doutorado/biologia <http://www.unisinos.br/mestrado-e-doutorado/biologia>

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list