I am trying to understand what the predicted values represent in the predict function in nlme
I am using the data and code given in the nlme manual for the predict
function as an example
library(nlme)
fm1 <- lme(distance ~ age, Orthodont, random = ~ age | Subject)
newOrth <- data.frame(Sex = c("Female","Female","Female","Female","Male","Male"),
age = c(15, 20, 10, 12, 2, 4),
Subject = c("M01","M01","F30","F30","M04","M04"))
## The Orthodont data has *no* F30 , so predict NA at level 1 :
predict(fm1, newOrth, level = 0:1)
What is the difference between the predict.fixed
and predict.Subject
column?
I gather that if we leave out the levels
argument we get the predicted value, at each requested value of age
, for each subject, and that this is the 0
in the 0:1
of the levels
argument. But what is predict.fixed
and how is it useful?