State space models and filtering methods in longitudinal studies