Hello,
I am attempting to use xtmixed for a repeated measures analysis looking at the effect of an intervention on scores for many different hospitals. I also want to adjust for rural/urban status. Each hospital has two years of data (labeled score1 and score2). I believed that xtmixed would be appropriate for this type of analysis, where hospital would be the random effect and the intervention and rural/urban status would be fixed effects. I'm getting confused on what to do with the time variable (a binary variable where 0=baseline and 1=2 years after baseline).
This is what I've done so far:
I reshaped like this: reshape long score, i(hospital) j(time).
I did a lot of reading and looking at examples but am still confused about how the time variable should be included in the model and what the conditions are under which the intervention/time interaction should be included. I have seen all of the following iterations on the forum:
1. xtmixed score i.intervention i.time i.rural || hospital:, var reml
2. xtmixed score i.intervention#time i.rural || hospital:, var reml
3. xtmixed score i.intervention i.intervention#time i.rural || hospital:, var reml
Can someone help me sort this out? I really want to have a good understanding of these models and just keep getting more confused the more I read.
Thank you,
Sarah
Related Posts with Specifying model correctly with xtmixed
r(2000) while calculating ratioDear All, I am trying to calculate the ratio of caesarean section rate in public versus private fac…
How to install meta-analysis in Stata SE 15.1?Hi, friends, I want to do meta-analysis in Stata SE 15.1, anyone who knows how to install meta-ana…
Dots on the resultsHello everybody, this is my first topic here, i am brazilian so sorry for my english.... Well, i am…
Error in multiple imputation with categorical repeated measuresHello, I'm trying to use multiple imputation with chained equations (N = 330, 6 time points). At ea…
Diagnostic test using "roctab" commandDear All, Sub: Need a stata codes for sensitivity and specificity. I need to do the diagnostic test,…
Subscribe to:
Post Comments (Atom)
0 Response to Specifying model correctly with xtmixed
Post a Comment