Skip to content

glmer - help with t values

2 messages · Elisa Fuentes-Montemayor, Ben Bolker

1 day later
#
Elisa Fuentes-Montemayor wrote:
What you need is a Wald F value, rather than a Wald t value

http://glmm.wikidot.com/local--files/examples/glmmfuns.R
has a waldF(object, variable, den.df) function where "object"
is your lme4 fit, "variable" is the name of your variable,
and "den.df" is your denominator df (you can just make it NA):

e.g.

tmp <- "http://glmm.wikidot.com/local--files/examples/glmmfuns.R"
source(url(tmp))

set.seed(1001)
x <- runif(300)
f <- factor(rep(LETTERS[1:3],each=100))
g <- factor(rep(letters[1:10],each=30))
params <- list(slope=2,int=c(-0.5,0.5,1),
               grp=rnorm(10,sd=1))
eta <- with(params,int[f]+slope*x+grp[g])
y <- rbinom(300,prob=plogis(eta),size=10)
X <- data.frame(x,f,y)

library(lme4)
m1 <- glmer(cbind(y,10-y)~f+x+(1|g),data=X,family=binomial)
summary(m1)

waldF(m1,"f",NA)