I need to ASSESS THE LONGITUDINAL CHANGE IN FAT BETWEEN 2 VISITS with a linear mixed effects model.
I have some that will change from visit 1 to visit 2, as they are hypertension status, diabetis status, bmi, waist circunference, smoking_status etc. And other variables that won't change from visit 1 to visit 2, as they are gender or ethnicity.
The following variables are dummy (hypertension status, diabetis status, smoking_status, gender) while the following are continuous (bmi, waist circunference, age).
My initial thoght using nlme
package was expressed as:
lme(fat~ diabetes_status + hypertension_status + bmi + waist + smoker + gender + ethnicity + Visit, random= ~1|PatientID/Visit, data = df, na.action = na.omit)
visit has 2 levels (1 and 2)
QUESTIONS:
- Do you think this is the correct way to assess whether there are longitudinal changes in fat?
- Do you think this contains too many fixed effects?
PS: I provide you with an example dataset:
df <- data.frame(PatientID = c(1000344, 1000344,1001471, 1001471, 1002830, 1002830),Visit = c(1,2,1,2,1,2),fat= c( 8.510 ,14.456, 4.612,4.738,18.021,25.740), diabetes_status= c("False" ,"True","False" ,"False" ,"False","True"), hypertension_status= c("True" ,"True","False" ,"True" ,"False","True"),bmi= c(32.0386 ,33.4919 ,29.6878 ,28.7660 ,26.1540 ,26.2788), waist= c(105 ,105 ,98 ,101 ,91 ,96), smoker= c(1 ,0 ,0 ,0 ,1 ,0), gender= c(1 ,1 ,0 ,0,1 ,1), ethnicity= c(1,1 ,0,0,1 ,1), stringsAsFactors = F)
Thanks!