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)