Hi,

I'm using lme to test for effect of brood size on mass consumed by nestlings
(birds).

lmefit1<-lme(LogMH ~ LogBrood,random=~1|Year,data=Energetics)

>From the model I would like to predict the value of mass consumed (LogMH)
for a given brood size and the standard error. However, I do find it
difficult to get the SE value, I have been searching a lot and only found
this: http://permalink.gmane.org/gmane.comp.lang.r.lme4.devel/3306

>From this information given by Ben Bolker I wrote:

#To find the predicted value and SE of mass consumed (LogMH) , for a brood
size equal (log10) --> 0.638035211#

newdat <- expand.grid(LogBrood=c(0.638035211))
newdat$pred <- predict(lmefit1, newdat, level = 0)
Designmat <- model.matrix(eval(eval(lmefit1$call$fixed)[-2]), newdat[-3])
predvar <- diag(Designmat %*% lmefit1$varFix %*% t(Designmat))
newdat$SE <- sqrt(predvar)
newdat$SE2 <- sqrt(predvar+lmefit1$sigma^2)
Will "newdat$SE" gives me the right SE value for my predicted value of mass
consumed (LogMH)? Or are there other ways to get the standard error of the
prediction?

Best regards Cotter

	[[alternative HTML version deleted]]


