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
time invariant variables and fixed effectsDear All, I wish to estimate the following panel data model using xtreg, fe yit = xitβ + γDi + uit …
Trying to code for a loop to clean data entry errors and destring my variables.Dear All, I have imported "household survey" in csv format that contains numerous data entry errors…
missing dataHi all, i am new to stata so please accept my naivety. i have a data set (n=1000) with 42 variables.…
Specifying model correctly with xtmixedHello, I am attempting to use xtmixed for a repeated measures analysis looking at the effect of an …
Too many variables specifiedHello! I'm trying to filter out the households (nohhold) that consistently had the value 3 for "woon…
Subscribe to:
Post Comments (Atom)
0 Response to Specifying model correctly with xtmixed
Post a Comment