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.

The code and data for this analysis are as follows:

library(languageR)
library(lme4, keep.source=FALSE)
library(coda)
cover=read.csv("cover.csv", header = T)
   cover$Block=as.factor(cover$Block)
   cover$Year=as.factor(cover$Year)

lmer.seeded=lmer(Seeded~Treat+(1|Fire/Block)+(1|Year),data=cover)
  mcmc=pvals.fnc(lmer.seeded,nsim=10000)
  aovlmer.fnc(lmer.seeded, mcmc$mcmc, c("TreatC", "TreatUC"))

Fire ,Year,Block,Treat,Invasive,Seeded
CF,2008,1,C,0.94,1.41
CF,2008,2,C,0.20,0.60
CF,2008,3,C,0.10,0.48
CF,2008,4,C,0.00,0.11
CF,2008,5,C,0.00,0.00
CF,2008,1,UC,0.41,0.65
CF,2008,2,UC,0.00,0.00
CF,2008,3,UC,0.06,0.00
CF,2008,4,UC,0.00,0.36
CF,2008,5,UC,0.00,0.00
CF,2009,1,C,2.48,3.88
CF,2009,2,C,1.63,3.19
CF,2009,3,C,1.17,2.32
CF,2009,4,C,2.98,1.90
CF,2009,5,C,1.55,0.00
CF,2009,1,UC,3.61,1.39
CF,2009,2,UC,1.37,0.30
CF,2009,3,UC,1.33,0.47
CF,2009,4,UC,0.99,0.00
CF,2009,5,UC,2.39,0.53
CF,2010,1,C,2.33,2.50
CF,2010,2,C,0.65,3.23
CF,2010,3,C,0.91,1.58
CF,2010,4,C,2.66,0.91
CF,2010,5,C,1.83,2.33
CF,2010,1,UC,4.87,0.91
CF,2010,2,UC,1.29,0.65
CF,2010,3,UC,3.71,0.65
CF,2010,4,UC,2.04,0.00
CF,2010,5,UC,5.77,0.91
M,2008,6,C,0.00,0.00
M,2008,7,C,0.00,0.00
M,2008,8,C,0.16,0.00
M,2008,9,C,0.00,0.20
M,2008,10,C,0.00,0.53
M,2008,6,UC,0.00,0.00
M,2008,7,UC,0.00,0.00
M,2008,8,UC,0.00,0.00
M,2008,9,UC,0.00,0.10
M,2008,10,UC,0.00,0.00
M,2009,6,C,2.43,1.14
M,2009,7,C,0.75,0.07
M,2009,8,C,2.43,0.07
M,2009,9,C,1.92,0.61
M,2009,10,C,1.22,1.83
M,2009,6,UC,0.00,0.07
M,2009,7,UC,0.00,0.07
M,2009,8,UC,0.00,0.07
M,2009,9,UC,0.00,0.07
M,2009,10,UC,0.00,0.07
M,2010,6,C,2.36,1.83
M,2010,7,C,3.07,1.29
M,2010,8,C,4.77,0.07
M,2010,9,C,5.27,0.07
M,2010,10,C,4.89,2.24
M,2010,6,UC,5.37,1.06
M,2010,7,UC,2.79,2.58
M,2010,8,UC,0.75,0.07
M,2010,9,UC,3.50,1.97
M,2010,10,UC,3.10,0.07


-- 
Daniel Zvirzdin
Plant and Wildlife Sciences Department
Brigham Young University
(801) 422-2211 (w)
(801) 472-6006 (c)

	[[alternative HTML version deleted]]


