I and a colleague collected before and after responses of from students in our classes to examine the impact of a documentary. We also collected demographic information from these students and coded them. We have 20 questions (with before and after responses) and 6 demographic variables (V1 – V6).
I have calculated the differences in the before and after responses for each question as Q*diff. For example Q1diff = Q1A - Q1B (where Q1A is the response after watching the documentary & Q1B is the response before watching the documentary)
I am planning to examine differences in before and after responses for each group of each demographic variable. For example,
Q1:
1. Is there a significant difference in the before and after responses from group1 (25 and under) and group2 (26 and over)?
2. Is there a significant difference in the before and after responses from group1 (Female) and group2 (Male)?
3. Is there a significant difference in the before and after responses from group1 (2 years or less), group2 (3 to 5 years), group2 (6 to 10 years), and group4 (More than 10 years)?
4. Is there a significant difference in the before and after responses from group1 (deg from some area of business) and group2 (other than business)?
.
.
.
.
.
And so on for all questions Q1 - Q20.
If I examine differences in before and after responses for all 20 questions over 6 demographic variables, it will be a total of 120 statistical tests.
I would be extremely grateful if I could get some help for the following:
1. To examine the above, should I perform a ttest with unequal variances i.e. ttest Q1diff, by(age) unequal? Or should I perform a one way ANOVA i.e. oneway Q1diff V1Age, tabulate, then use pwmean Q1diff over(V1age) mcompare(tukey) effects? The latter seems more appropriate for Q1.3. listed above.
2. Whichever one I end up using, how can I automate 120 statistical tests and export the results of ttest, [oneway and pwmean] commands in 2 separate excel workbooks?
I have calculated the differences in the before and after responses for each question as Q*diff. For example Q1diff = Q1A - Q1B (where Q1A is the response after watching the documentary & Q1B is the response before watching the documentary)
I am planning to examine differences in before and after responses for each group of each demographic variable. For example,
Q1:
1. Is there a significant difference in the before and after responses from group1 (25 and under) and group2 (26 and over)?
2. Is there a significant difference in the before and after responses from group1 (Female) and group2 (Male)?
3. Is there a significant difference in the before and after responses from group1 (2 years or less), group2 (3 to 5 years), group2 (6 to 10 years), and group4 (More than 10 years)?
4. Is there a significant difference in the before and after responses from group1 (deg from some area of business) and group2 (other than business)?
.
.
.
.
.
And so on for all questions Q1 - Q20.
If I examine differences in before and after responses for all 20 questions over 6 demographic variables, it will be a total of 120 statistical tests.
I would be extremely grateful if I could get some help for the following:
1. To examine the above, should I perform a ttest with unequal variances i.e. ttest Q1diff, by(age) unequal? Or should I perform a one way ANOVA i.e. oneway Q1diff V1Age, tabulate, then use pwmean Q1diff over(V1age) mcompare(tukey) effects? The latter seems more appropriate for Q1.3. listed above.
2. Whichever one I end up using, how can I automate 120 statistical tests and export the results of ttest, [oneway and pwmean] commands in 2 separate excel workbooks?
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte(V1Age V2Gend V3Exp Q1B Q2B Q3B Q4B Q5B Q1A Q2A Q3A Q4A Q5A) float(Q1diff Q2diff Q3diff Q4diff Q6diff) 0 0 0 4 1 1 1 3 5 1 5 1 3 1 0 4 0 1 1 1 4 4 4 1 4 3 4 1 2 4 2 0 -3 1 0 2 1 1 3 4 2 4 1 2 4 2 2 4 3 0 0 -2 3 0 0 1 1 2 1 3 5 1 5 1 5 5 5 3 0 2 0 0 . 1 1 3 4 3 4 3 4 2 4 3 4 1 -2 1 -1 0 0 0 1 2 5 2 3 2 5 3 2 4 4 3 -2 0 1 1 1 1 2 2 4 2 3 3 4 2 2 3 4 2 -2 0 0 0 0 0 1 3 4 5 4 4 5 5 5 5 5 2 1 0 1 0 1 1 1 3 2 2 2 2 3 3 3 3 3 0 1 1 1 1 1 1 3 4 2 4 4 3 5 1 4 5 5 1 -1 0 1 0 1 1 4 3 3 3 3 3 3 3 3 3 3 0 0 0 0 0 1 1 2 4 2 4 4 3 4 2 5 3 4 0 0 1 -1 1 1 1 4 4 1 4 4 4 4 1 4 4 4 0 0 0 0 1 1 1 4 5 1 5 3 4 5 1 5 5 5 0 0 0 2 0 1 0 4 5 1 2 2 3 5 2 2 4 3 0 1 0 2 -1 1 1 1 3 3 2 3 3 3 4 3 4 3 0 1 1 1 -1 0 1 2 4 2 3 1 3 4 2 4 4 4 0 0 1 3 -1 0 0 1 4 2 4 3 3 5 2 4 3 3 1 0 0 0 0 end label values V1Age agelabel label def agelabel 0 "25 or under", modify label def agelabel 1 "26 or over", modify label values V2Gend gendlabel label def gendlabel 0 "Female", modify label def gendlabel 1 "Male", modify label values V3Exp explabel label def explabel 1 "2 years or less", modify label def explabel 2 "3 to 5 years", modify label def explabel 3 "6 to 10 years", modify label def explabel 4 "More than 10 years", modify
Comment