willow1980
2009-Nov-18 19:51 UTC
[R] standard error for the estimated value (lmer fitted model)
Dear R users, I want to draw standard error lines for the predicted regression line estimated by logistic regression using lmer. I have two predictors: cafr and its quadratic form I(cafr^2), where cafr is a variable centered around the mean of original variable. Now, the estimated value from the fitted model will be, (model@X)%*%fixef(model) In the logit scale, the mean sum of square from fitted model will be, sesample=sqrt(sum(resid(model)^2)/(n-p-1)), where p is the degrees of freedom used for fitting. Could someone make a judgement if it is reasonable to calculate standard error of the estimated value by sesample*sqrt(vector%*%ginv(t(model@X)%*%model@X)%*%t(vector)) , where vector is the (1,cafr,I(cafr^2)) which representing empirical data vector at considered point. If this is correct, I think I can use this method to draw standard error line. Otherwise, would you please suggest a reasonable one? Thank you very much for your attention! Yours sincerely, Jianghua -- View this message in context: http://old.nabble.com/standard-error-for-the-estimated-value-%28lmer-fitted-model%29-tp26414507p26414507.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML version deleted]]