In a cross-over design every subject underwent treatment and placebo. During treatment/placebo and 10 minutes after we recorded the dependent variable. The dependent variable was recorded on a trial level. Time was coded with 0 (during) and 1 (after). Treatment as 0 (placebo) and 1 (active). Wins as 0 (low) and 1 (high). My aim is to put all data of assessments during and after in one model, because in a way measurements are dependent of each other. Therefore in a first step i used the following code.
Next I was interested in the marginal effects of active vs. placebo during low and high wins of either during (time=0) or after (time=1) treatment.
In your opinion, is this code correct to integrate the three variables time, treatment and wins?
Code:
mixed dependentvarialble treatment##time i.wins##i.treatment || id:, dfmethod(kroger) reml covariance(unstructured)
Code:
margin wins if time==0, dydx(treatment) margin wins if time==1, dydx(treatment)
Comment