Dear R users,
I have posted a similar message in the following link:
However, I did not get responses. I guess my question is not clear. Now, I
would like to clarify it and if someone is familiar with lmer modelling,
please give me a help. Thank you in advance for your attention!
Take a model fitted by lmer. The response is a binomial variable (proportion
or binary).
Now, the prediction based on fixed effects only can be calculated as
model at X%*%fixef(model).
According to an algorithm mentioned by Snedecor & Cochran (1989, p353), for
the normal response variable, the standard error for the estimated value
should be calculated as:
s*sqrt(vector(x)%*%inverse(t(model at X)%*%model at X)%*%t(vector(x))), where s is
the square root of the residual mean square, vector(x) is the vector at the
prediction point. For example, if the model has just one continuous
predictor, vector(x) should be (1,x) when the predictor value is x.
Then, how to calculate standard error for the estimated value in case of
binomial response data? In case of normal response variable, square root of
the residual mean square is easy to calculate. In case of binomial data, I
even don?t know how to calculate residual in logit scale, since in many
cases, logit(y) is immaterial when y is equal to 0 or 1, where y is
By the way, Douglas Bates once mentioned that it is possible to calculate
standard error for predictions based only on fixed effects. See the
following link:
?It is clear what the predictions based on the fixed effects only should be
and perhaps it is clear what the standard errors of those predictions are
(although that would be a case where my favorite topic of the degrees of
freedom associated with a standard error would rear its ugly head again).?
Does someone have any idea to solve the task mentioned by him? How about the
case of Poisson response variable?
Thank you very much!
Best regards,
View this message in context: http://old.nabble.com/How-to-calculate-standard-errors-of-predictions-based-on-the-fixed-effects--lmer-tp26488365p26488365.html
Sent from the R help mailing list archive at Nabble.com.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupr-help @
postedNov 24, '09 at 12:01a
activeNov 24, '09 at 12:01a

1 user in discussion

Willow1980: 1 post



site design / logo © 2018 Grokbase