0

I have a biomedical data named data1, and I want to construct a random effect model to analyze 'eGFR'(a continuous variable), there are four covariates I am interested in this study, 'sex', 'diabetes state', 'smoking state', 'treatment time'.

If I want to assume this four factors to be fixed effect, and the intercept to be random effect, how do I construct this mixed effect model in R language?

For example, I want to write this type :

lme(eGFR~sex+diabetes+smoking+time, random=???, data=data1)
M_Shimal
  • 413
  • 3
  • 12
Wayne
  • 1
  • 1
  • I think you want `random = ~1|indiv` where `indiv` is the column which identifies individuals in your data. –  Mar 28 '17 at 07:20
  • Thank you. I have another question, the same example, if I assume 'smoking', 'time' and intercept to be random effect, and 'sex' and 'diabetes' to be fixed effect, how do I construct the mixed effect model in R? – Wayne Mar 28 '17 at 07:24
  • 1
    `~sex+diabetes|indiv` and now it is time for you to read some documentation. –  Mar 28 '17 at 07:31
  • Thank you, I have no to find the example for the multiple covariates in mixed effect model, and I know how to do this now, thanks! – Wayne Mar 28 '17 at 07:37

0 Answers0