I tried to finish a homework in longitudinal data analysis. the question is to compare the difference in the cross-sectional and longitudinal effects of age (baseline cross-sectional:baseage, longtitudinal age: agechange) within a model.
the model I code like: fit<-lme(logfev1~baseage+agechange+height,random = ~1|id,correlation=corAR1(form=~visit|id),logfev1)
In Stata we just need to code like : test baseage=agechange, then the answer will shows: test baseage = change_age
[logfev1]baseage - [logfev1]change_age = 0
chi2( 1) = 0.41
Prob > chi2 = 0.5244
but in R I really don't know how to do the test (wald test).