treating measurement occasions as a numerical or as a factor predictor
Hi all, I am (almost) sure this question has been asked before but I am new here and I have not found the best answer yet after some googling. I would like to ask a question about treating measurement occasions in a longitudinal analysis specifically when using linear mixed model. In my study, I have taken data on 3 separate occasions (at baseline, at 1 month and at 3 months post baseline). I am not sure what is best approach treat these measurement occasions in my analysis using lmer or lme functions. Should I treat them as a numeric or as a factor variable. My feeling says that I should treat such measurement occasions as a factor but I do not have strong theoretical reasons for that. Treating them as a factor predictor will make my nlme::lme codes like these; for random intercept: lme(y~1+ covariateA+factor(occasion), random=~1|subject, data=data) and for random slope: lme(y~1+covariteA+factor(occasion),random=~1+factor(occasion)|subject, data=data) I appreciate someone can enlighten me on this issue or point to any useful literature. Thanks very much. Best wishes, Kamarul
Dr. Kamarul Imran Musa (MD MCommunityMed) Dept of Community Medicine, School of Medical Sciences, Universiti Sains Malaysia, 16150 Kbg Kerian Kelantan MALAYSIA ResearcherID: http://www.researcherid.com/rid/N-3198-2015 Personal blog: http://designdataanalysis.wordpress.com Email : drki.musa at gmail.com , k.musa at lancaster.ac.uk