[R-sig-ME] transforming predicted values of a glmm lme4
Michael Gerisch
michael.gerisch at ufz.de
Tue May 17 14:46:19 CEST 2011
Dear list,
I calculated predicted values from a poisson glmm (glmer) like this:
predvals <- model.matrix ( terms ( fm1 ) , data2 ) %*% fixef ( fm1 )
whereas fm1 is my model & data2 is my new dataframe used for prediction.
When using the predict function, e.g. for glms, there is the option to set
type="response", which is nice, as you get your predicted values on the scale
of the response variable. Which means counts in my case.
Alas, there is obviously no such possibility for a mer-object in lme4 and my
question is how I can transform my predicted values "by hand" to the scale of
the response variable.
Thanks in advance & cheers
Michael
More information about the R-sig-mixed-models
mailing list