I am analyzing data with the mental health component score (measured 0-100) for 4500 individuals. This score was measured at baseline and then 30 days following an intervention.
I would like to use regression to see the average change in score over time.
I used the following codes to reshape my data:
rename preop_mcs test1
rename x30d_mcs test2
reshape long test, i(sampleid) j(time)
xtset sampleid
xtreg test
I then conducted a mixed effects regression with the following code:
meglm test time || sampleid:
Then I added covariates:
meglm test time age sex smoking race bmi || sampleid:
I've noticed no matter how many or which covariates I've added the coefficient for time does not change. Because I know age is significantly associated with the score from my previous analysis, I'd expect to see at least a little change. This makes me think something is wrong with my coding and/or approach.
I appreciate any guidance with the above coding and how to proceed with a regression.
Related Posts with Analyzing two time points with regression
Choice model (cm) data layoutHi all, I am in the midst of setting up my data to run a panel-data mixed logit choice model (cmxtm…
Mixed Design ANCOVAHi guys, I am having difficulties with choosing an appropriate statistical analysis for my research…
Calculating proportions of the make-up of different program groups at different measurement occasions - helpHello, My dataset consists of ~6000 referrals to a suite of four types of psychological programs ov…
Graphing two categorical variablesHello everyone, I'm new to the Forum and relatively beginner at Stata, so sorry if the answer for w…
Integer related issueI'm new to STATA. I used Excel prior but recently purchased STATA. I'm learning as I go. Here is my …
Subscribe to:
Post Comments (Atom)
0 Response to Analyzing two time points with regression
Post a Comment