# Most appropriate statistical test for this nested design

#### emblem101

##### New Member
I currently am conducting a study where I have three variables: one that is binary, and two numerical variables as measured on a ratio scale. Each of the subjects in my study has values for each of the three variables.

Variables:

Condition (binary): Values 0 and 1
Pre (ratio)
Post (ratio)

I want to test if there is a significant difference between the the pre and post variables of the 0 control group and the 1 experimental group. Both groups have 103 subjects. The data meet all typical ANOVA assumptions such as normality and the like. I was thinking of nesting the variables as follows and then running a two-way ANOVA.

Variable 1 is exposed / not and variable 2 is pre / post. People are nested in Variable 1 (meaning that each person gives both pre and post information for either exposed or not exposed conditions)

Would this be the correct way to approach this problem? Also how would I implement this statistical analysis, preferably in R or SPSS?

#### CB

##### Super Moderator
Sounds like a mixed ANOVA (between subjects factor = condition; within-subjects factor = pre/post). Info on how to implement in R here: http://www.r-statistics.com/2010/04/repeated-measures-anova-with-r-tutorials/

You might be interested in including an interaction between condition and pre/post. This could tell you whether the difference between pre and post measurements depends on which condition the person is in.

#### emblem101

##### New Member
Thank you for the help. The interaction term would be useful. Do you know how to specify an interaction between condition and pre/post in SPSS?

#### CB

##### Super Moderator
In SPSS it's Analyze > General Linear Model > Repeated measures. The default is a full factorial model so you don't need do nothin' special to get the interaction.