Hi, I need help with ensuring I'm using the right postestimations commands to obtain a slope through repeated measurements of a biomarker using a multilevel model.
The data structure is in a longform with per study participant 3 biomarker measurements over the day with exact time of measurement for each.
I am following a model used in a research paper described which can be paraphrased as: The slope across the day was derived from a hierarchical linear model (multilevel model) to predict the biomarker across the measurements with measurement occasion used as level 1 identifier, participant as level 2 identifier, sample time as independent variable and random intercepts and random slopes. The slope was estimated per participant as the overall slope + level 2 slope residual.
id=participant identifier
occasion=measurement occasion 1, 2 or 3 (based on the three measurements taken over the day
time= exact time of day of measurement
biomarker= value of biomarker measurement
I have been running the following:
xtset id occasion
xtmixed biomarker time || id:, mle cov(unstr) variance
predict level2s, reffects level(id)
gen slope=_b[measurement-time]+level2s
It would be great to hear if this looks correct to anyone?
Thank you so much in advance
The data structure is in a longform with per study participant 3 biomarker measurements over the day with exact time of measurement for each.
I am following a model used in a research paper described which can be paraphrased as: The slope across the day was derived from a hierarchical linear model (multilevel model) to predict the biomarker across the measurements with measurement occasion used as level 1 identifier, participant as level 2 identifier, sample time as independent variable and random intercepts and random slopes. The slope was estimated per participant as the overall slope + level 2 slope residual.
id=participant identifier
occasion=measurement occasion 1, 2 or 3 (based on the three measurements taken over the day
time= exact time of day of measurement
biomarker= value of biomarker measurement
I have been running the following:
xtset id occasion
xtmixed biomarker time || id:, mle cov(unstr) variance
predict level2s, reffects level(id)
gen slope=_b[measurement-time]+level2s
It would be great to hear if this looks correct to anyone?
Thank you so much in advance

Comment