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
Creating a table using -estpost- and -esttab-Hello, my dataset consists of the following variables: id (fund id), date (year month), hret (histo…
Spatial autocorrelation with fixed effects negative binomial regressionHi all, I'm examining the effect of fire occurrence on visits to National Parks and Forests using a…
why always (invalid nameHere is my code as shown below, when I run it, it always report error "( invalid name". Somebody ple…
How to compare two coefficients in two forthlogit regressions?Hello, As my dependent variable is a rare event, I am running forthlogit regressions. In my sample,…
outreg2 table to pdfDear Statalist I try to make some tables for my bachelor thesis, but have trouble making them look …
Subscribe to:
Post Comments (Atom)
0 Response to Specifying model correctly with xtmixed
Post a Comment