[R-sig-eco] FW: mixed effect model: compare seed families

Liza Comita lsc2125 at columbia.edu
Thu Jan 21 16:32:23 CET 2010



Re: FW:  mixed effect model: compare seed families

To get around the problem of 'lmer()' not returning p values, Bates  
recommends using a Markov Chain Monte Carlo sample to evaluate the  
properties of individual coefficients.  This is much easier than it  
may sound!

If you download and install the library 'languageR', there is a  
function called
'pvals.fnc()', which computes p-values and MCMC confidence intervals  
for mixed models. It is very simple to use.

'pvalues.fnc' internally calls the functions 'mcmcsamp()' and  
'HPDinterval()', which are what Bates recommends, to generate 95% MCMC  
confidence intervals and p values.  It also supplies p values based on  
the t statistic (using the number of observations minus the number of  
fixed-effects coefficients as degrees of freedom), but warns that this  
p-value is anti-conservative.  So, the MCMC intervals and p values are  
probably the best to use.

However, and this may be a problem for your particular design, the  
'pvalues.fnc' help file warns: "Currently, MCMC sampling for  
generalized linear mixed models may not work off the shelf when there  
is more than one random intercept in the model."  But these functions  
are constantly being updated, so hopefully by now it can handle more  
than 1 random effect.


Also, for information about why lmer does not supply p-values, see  
these sites:
https://stat.ethz.ch/pipermail/r-help/2006-May/094765.html
http://tolstoy.newcastle.edu.au/R/help/06/08/32409.html

Hope that helps!

Liza Comita



More information about the R-sig-ecology mailing list