Nonparametric Models for Longitudinal Data (With Implementation in R)