Get subject-specific peak velocity and age at peak velocity values from linear mixed spline models
问题 I am fitting a linear mixed effects model with a natural spline function for age in order to describe the nonlinear trajectory for a repeated outcome y (bone mineral content in grams) across time ( age in years). How can I solve the spline derivatives to get the velocity curve and estimate for each individual their peak velocity (grams/year) and age at peak velocity (years) from this model? This is the example data dat <- structure(list(id = c(1001L, 1001L, 1001L, 1001L, 1001L, 1002L, 1003L,