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
RIF functionHello Everyone, I have been reading some literature on Recentered Influence function and Influence …
Graph the marginal effect of x1 on y (y-axis) against x2 (x-axis)?Dear All, Suppose I run the following regression: Code: // ssc install interflex, interactplot sysu…
quantile regressionHello everyone, I am doing an analysis on "Socio economic inequality on childhood health outcomes".…
Question about multivariate regression analysisDear colleagues, Good morning. I would like to ask about multivariate regression analysis. I researc…
General structure of data.How can I describe the structure of the dataset using summary statistics, graphical analysis and var…
Subscribe to:
Post Comments (Atom)
0 Response to Analyzing two time points with regression
Post a Comment