0

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:

  1. Do you think this is the correct way to assess whether there are longitudinal changes in fat?
  2. 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!

Lili
  • 547
  • 6
  • 19

1 Answers1

2

What you have isn't a bad start. The fixed effect parameters (you can obtain by running fixef() on the model object) should give you some indication of the 'overall' effect of each of your models fixed effects on the outcome variable.

It's hard to say whether or not your model contains too many fixed effects without knowing how much data you have. Some other factors may also be important, such as the degree to which your predictors co-vary (particularly the dummy variables). For your sample dataset, you certainly have too many fixed effects, however, I'm guessing you have more than six observations in your real dataset. Some low hanging fruit here might be to remove either BMI or waist circumference. Both are essentially trying to measure the same thing.

I'd recommend spending some time with Pinheiro, J.C., and Bates, D.M. (2000) "Mixed-Effects Models in S and S-PLUS", Springer. It's an excellent resource, with many different worked examples. Mixed-effects models is a large topic. I believe the book also has some sections on the order in which you should build up model complexity, and how you can test whether or not the addition or fixed and random effects improves the model. For instance, it matters whether or not you've fit the model using maximum likelihood or restricted maximum likelihood, when assessing the inclusion/removal of fixed/random effects.

EDIT: I've just noticed that you only have two visits. You might be better off stripping off the visit model layer and modelling the "change in fat" between the visits as the outcome. You also wouldn't need a level for patient ID if you only have one measurement per patient at each of those two visits. Hence, you could make do with a simple linear regression model. However, I'm making quite a few assumptions about your data from the sample data you've provided.

Feakster
  • 558
  • 4
  • 14
  • Thanks @Feakster, any suggestion on the longitudinal effect apart from calculating the delta change in fat for linear regression. How would you do it with LME (the reason why we need LME is because the independent variables change from one one visit to another) – Lili Aug 13 '20 at 09:18
  • I think this link answers the question on how to model longitudinal changes in Linear mixed effects model : http://rstudio-pubs-static.s3.amazonaws.com/305316_c2e72182a11f41d39051d5c9091e4911.html Particularly, the answer to my specific problem is: model1 = lme(fixed = fat ~ visit + gender + ethnicity + diabetes_status + hypertension_status + bmi+ waist + smoker + age, random = ~ visit| patientID, data = df) sumModel1 = summary(model1); sumModel1 Hope this helps! – Lili Aug 13 '20 at 15:16