You can download the dataset for this chapter by clicking here: https://stats.idre.ucla.edu/wp-content/uploads/2016/02/nyvoucher.sas7bdat.
data nyvoucher; set "d:datanyvoucher"; run;
Descriptive statistics for the variables voucher, pre_ach, and post_ach. Note: this output does not appear in the text.
proc means data = nyvoucher; var voucher pre_ach post_ach; run; The MEANS Procedure Variable Label N Mean Std Dev Minimum Maximum VOUCHER VOUCHER 521 0.5585413 0.4970383 0 1.0000000 PRE_ACH PRE_ACH 521 20.1641075 18.2552268 0 92.0000000 POST_ACH POST_ACH 521 23.8666027 19.2088961 0 89.0000000
Strategy #1 from Table 4.1 on page 49.
proc ttest data=nyvoucher; class voucher; var post_ach; run; The TTEST Procedure Variable: POST_ACH (POST_ACH) VOUCHER N Mean Std Dev Std Err Minimum Maximum 0 230 21.1304 18.1723 1.1982 0 84.5000 1 291 26.0292 19.7540 1.1580 0.5000 89.0000 Diff (1-2) -4.8988 19.0723 1.6827 VOUCHER Method Mean 95% CL Mean Std Dev 95% CL Std Dev 0 21.1304 18.7694 23.4914 18.1723 16.6495 20.0042 1 26.0292 23.7501 28.3084 19.7540 18.2689 21.5040 Diff (1-2) Pooled -4.8988 -8.2046 -1.5930 19.0723 17.9793 20.3078 Diff (1-2) Satterthwaite -4.8988 -8.1726 -1.6250 Method Variances DF t Value Pr > |t| Pooled Equal 519 -2.91 0.0038 Satterthwaite Unequal 507.17 -2.94 0.0034 Equality of Variances Method Num DF Den DF F Value Pr > F Folded F 290 229 1.18 0.1856
Strategy #2 from Table 4.1 on page 49.
proc glm data = nyvoucher; model post_ach = voucher / solution; run; The GLM Procedure Number of Observations Read 521 Number of Observations Used 521 Dependent Variable: POST_ACH POST_ACH Sum of Source DF Squares Mean Square F Value Pr > F Model 1 3082.8902 3082.8902 8.48 0.0038 Error 519 188787.5887 363.7526 Corrected Total 520 191870.4789 R-Square Coeff Var Root MSE POST_ACH Mean 0.016068 79.91208 19.07230 23.86660 Source DF Type I SS Mean Square F Value Pr > F VOUCHER 1 3082.890212 3082.890212 8.48 0.0038 Source DF Type III SS Mean Square F Value Pr > F VOUCHER 1 3082.890212 3082.890212 8.48 0.0038 Standard Parameter Estimate Error t Value Pr > |t| Intercept 21.13043478 1.25759014 16.80 <.0001 VOUCHER 4.89877484 1.68271858 2.91 0.0038
Strategy #3 from Table 4.1 on page 49.
proc glm data = nyvoucher; model post_ach = voucher pre_ach / solution; run; The GLM Procedure Number of Observations Read 521 Number of Observations Used 521 Dependent Variable: POST_ACH POST_ACH Sum of Source DF Squares Mean Square F Value Pr > F Model 2 84863.1705 42431.5852 205.40 <.0001 Error 518 107007.3084 206.5778 Corrected Total 520 191870.4789 R-Square Coeff Var Root MSE POST_ACH Mean 0.442294 60.22145 14.37282 23.86660 Source DF Type I SS Mean Square F Value Pr > F VOUCHER 1 3082.89021 3082.89021 14.92 0.0001 PRE_ACH 1 81780.28025 81780.28025 395.88 <.0001 Source DF Type III SS Mean Square F Value Pr > F VOUCHER 1 2154.79707 2154.79707 10.43 0.0013 PRE_ACH 1 81780.28025 81780.28025 395.88 <.0001 Standard Parameter Estimate Error t Value Pr > |t| Intercept 7.718876568 1.16297790 6.64 <.0001 VOUCHER 4.097608585 1.26872975 3.23 0.0013 PRE_ACH 0.687312475 0.03454393 19.90 <.0001