Dear All,
I have some problems with a mixed – repeated measures analysis.
I have 42 animals, with repeated measures of sleep, averaged by month, for 6 months.
As a first step, I would like a mixed model with simple fixed effects such as season, sex, age, BMI. Random effects are enclosure and id.
My first attempt:
My questions are:
I have some problems with a mixed – repeated measures analysis.
I have 42 animals, with repeated measures of sleep, averaged by month, for 6 months.
As a first step, I would like a mixed model with simple fixed effects such as season, sex, age, BMI. Random effects are enclosure and id.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str6 id str12 TAG float(sex_num age2019 sqrage) str2 Enclosure float(BMI season mdate mo_t_NREM) "10E" "57-36-88" 0 29.535934 872.3714 "E1" 39.01508 1 703 252.7 "10E" "57-36-88" 0 29.535934 872.3714 "E1" 39.01508 1 704 243.1739 "10E" "57-36-88" 0 29.535934 872.3714 "E1" 39.01508 2 705 189.22223 "10E" "57-36-88" 0 29.535934 872.3714 "E1" 39.01508 2 706 224.375 "10E" "57-36-88" 0 29.535934 872.3714 "E1" 39.01508 3 707 142.47368 "10E" "57-36-88" 0 29.535934 872.3714 "E1" 39.01508 3 708 183.5652 "10F10" "66-36-73" 0 11.46338 131.4091 "E1" 41.77965 1 703 98.54546 "10F10" "66-36-73" 0 11.46338 131.4091 "E1" 41.77965 1 704 96.1875 "10F10" "66-36-73" 0 11.46338 131.4091 "E1" 41.77965 2 705 352.5909 "10F10" "66-36-73" 0 11.46338 131.4091 "E1" 41.77965 2 706 670.8333 "10F10" "66-36-73" 0 11.46338 131.4091 "E1" 41.77965 3 707 717.9048 "10F10" "66-36-73" 0 11.46338 131.4091 "E1" 41.77965 3 708 722.7667 end format %tm mdate
Code:
mixed mo_t_NREM season age2019 sex_num BMI, || Enclosure: || id:, vce(robust)
My questions are:
- Should the month (mdate) be added in the randon effects?
- How can I specify that the within-subject covariance structure is autoregressive?
- What is the best variance specification?
Comment