[R] pvals.fnc unhappy about lmer objects

Horace Tso Horace.Tso at pgn.com
Tue Aug 21 19:16:16 CEST 2007


Dear folks (or Dear Professor Bates),

I'm quite confused as to the current status of some of the available
functions applicable to lmer objects. Following the examples in Baayen,
Davidson, Bates (2006), my plan is to run mcmcsamp on a random effect
model created by lmer in package lme4, then use the (perhaps outdated)
pvals to estimate p-value. But then I couldn't find pvals anywhere. 

So question number one is : Has pvals been replaced? by pvals.fnc in
the package languageR perhaps?

>From the help page, it's stated that pvals.fnc takes a model fitted
with lmer, in contrast with the pvals I've read about in Baayen et al,
which takes an mcmc object. So I then tried,

 hr.lmer = lmer(hr ~ tg + spl + (1+tg|M), data=dat)
 pvals.fnc(hr.lmer)

An error is reported,

"Error in get(x, envir, mode, inherits) : variable "Gen.2001" of mode
"function" was not found"

First I suspected it must be my model, so I run through the example in
pvals.fnc help page, as follow,
> data(primingHeid) 
> primingHeid = primingHeid[primingHeid$RT < 7.1,]
> primingHeid = primingHeid[primingHeid$RT < 7.1,]
> primingHeid.lmer = lmer(RT ~ RTtoPrime * ResponseToPrime + 
+     Condition + (1|Subject) + (1|Word), data = primingHeid)
> primingHeid.pvals = pvals.fnc(primingHeid.lmer)

The same error is encountered,

"Error in get(x, envir, mode, inherits) : variable "Gen.2001" of mode
"function" was not found"

Thanks in advance.

Horace W. Tso

*---------------------------------------------------------------------------------------------------------------------
PS: I'm on Windows XP,  with R2.5.1 (2007-06-27)

> sessionInfo()
R version 2.5.1 (2007-06-27) 
i386-pc-mingw32 

locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
States.1252;LC_MONETARY=English_United
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

attached base packages:
[1] "splines"   "graphics"  "grDevices" "datasets"  "utils"     "stats"
    "methods"   "base"     

other attached packages:
   languageR        rpart         MASS       Design     survival       
Hmisc        e1071        class      cluster 
       "0.2"     "3.1-37"     "7.2-34"      "2.1-1"       "2.32"     
"3.4-2"     "1.5-16"     "7.2-34"     "1.11.7" 
       zipfR         coda xlsReadWrite         lme4       Matrix     
lattice         R.oo          zoo 
     "0.6-0"     "0.12-1"      "1.3.2"  "0.99875-7" "0.999375-1"   
"0.15-11"      "1.2.7"      "1.2-2" 
>



More information about the R-help mailing list