Case Study: The Spock Conspiracy Trial in SAS
The main question is there is evidence that women underrepresented on Spock judges venire when compared to other judges?
1. SAS Code
Read the data file by using infile code, and sort into two groups; 'SPOCKS' and 'OTHER' by using if statement. For the box plot, use the proc sgplot, and for the t-test use the porc ttest code.
2. SAS Code - Output List
If you run the SAS code above, you can see the result list below. There are two results; Sgplot (box plot) and T-test.
If you click the the SGplot Procedure, then you can see the boxplot output. This plot will be stored in PNG file as we put the ods graphics on statement.
Are the mean of two groups significantly different? Also, in 'OTHER' group, there might be suspected outlier. We should keep in mind about it and see the t-test result.
4. SAS Result - T-test & Conclusion
We are going to check those two results; T-test and Q-Q plots.
In the t-test, we see the Satterthwaite method as the variance of two groups are unequal. So, the t-value is 7.16 which p-value is less than 0.0001. Therefore, as we have a small p-value, we can conclude that we reject the null hypothesis. (The null hypothesis is that the mean of two groups are equal)
In order to assess assumption of normality of the residuals, we should see the Q-Q plot (quantile quantile plot). From the Q-Q plot, it appears to be normally distributed, as most circles are close enough to the line.
No comments:
Post a Comment