data(heights)
## fit sitar model for height
m1 <- sitar(x=age, y=height, id=id, data=heights, df=5)
## plot unadjusted data as growth curves
plot(m1, opt='u')
## overplot with adjusted data as points
with(heights, points(xyadj(age, height, id, m1), col='red', pch=19))
Run the code above in your browser using DataLab