[R-sig-ME] lmer p-value extraction: LanguageR S4 object error

Ben Bolker bbolker at gmail.com
Tue May 24 14:52:19 CEST 2011

On 11-05-27 01:00 PM, Daniel Zvirzdin wrote:
> Hey All,
> I'm using the package languageR to extract p-values from a lmer model using
> the syntax and data at the end of this post. Within language R,  when I try
> and use the pvals.fnc function I get the following error:
> Error in pvals.fnc(lmer.seeded, nsim = 10000) :
>   trying to get slot "coefs" from an object (class "summaryDefault") that is
> not an S4 object
> Any help in figuring this out would be appreciated.
> The background on this analysis is that I have two treatments (C and UC)
> within five blocks, within two sites (M and CF). With data collected over
> three consecutive years. In this analysis I would like to set year, and
> block (nested within site) as random effects, with treatment as the fixed
> effect to determine if there are differences in vegetation density between
> treatments.

  It's a little dodgy to use year (with only 3 levels) as a random
effect -- you might try with a fixed effect and see whether you get
different results.

  I don't understand why you're using aovlmer.fnc with
which=c("TreatC","TreatUC") -- it looks to me as though this function is
intended to be used to test hypotheses involving multiple parameters
simultaneously equalling zero.  Testing both levels of the treatment in
this way doesn't really make sense (to me).  Furthermore, I think you'd
need "Treat-1" rather than "Treat" as your fixed effect to do this.

  If you just want to test for differences between the two treatment
levels, what's wrong with the results of 'mcmc0' below?


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