[R] Mixed Effect Model - Jackknife error estimate

Michael Falkowski falk4587 at uidaho.edu
Wed May 11 05:31:33 CEST 2005


Greetings,

I’ve fit the following mixed effects model using the NLME package:

hd.impute.lme <- lme(I(log(HEIGHT_M - 1.37)) ~ SPECIES + SPECIES:I(1/(DBH_CM + 2.54)),
        random = ~ I(1/(DBH_CM + 2.54)) | PLOTID,
        data = trees, na.action = na.exclude)

I would now like to extract a jackknife estimate of model error. I tried the following code, however, the estimate produced seems too low.

ss.ok <- 0
for (i in 1:dim(trees)[1])
 lme.msc <- ss.ok + sum(sd(lme(I(log(HEIGHT_M - 1.37)) ~ SPECIES + SPECIES:I(1/(DBH_CM + 2.54)),
        random = ~ I(1/(DBH_CM + 2.54)) | PLOTID,
        data = trees[-i,], na.action = na.exclude)$residuals))

rmse <- lme.msc/(dim(trees)[1]-1)

#output
#rmse = 0.4701232

Any suggestions?

Thanks,
Mike




More information about the R-help mailing list