/*===================================================== File name: 2_single_regression_coefficient.txt Written by: Karl L. Wuensch, WuenschK@ECU.edu Date: 28-August-2012. ===================================================== * Use intercepts and slopes from Table 2. * First test H0: intercept = 0. * Then test HO: slope = 0. * Then test H0: intercept = 145. * Then test H0: slope = 3.5. */ data ab; input b bstar se df alpha Note $35.; t=(b-bstar)/se; tneg=0-abs(t); p=2*probt(tneg,df); cump=1-alpha/2; CV=TINV(cump,df); CI_Lower=b-CV*se; CI_Upper=b+CV*se; CARDS; 142.011 0 10.664 22 .05 Intercept, Burbank 148.053 0 11.142 47 .05 Intercept, Lancaster 144.038 0 18.250 17 .05 Intercept, Long Beach 130.445 0 10.228 56 .05 Intercept, Glendora 4.179 0 1.105 22 .05 Slope, Burbank 3.709 0 1.177 47 .05 Slope, Lancaster 3.749 0 1.866 17 .05 Slope, Long Beach 5.689 0 1.044 56 .05 Slope, Glendora 142.011 145.0 10.664 22 .05 Intercept, Burbank 148.053 145.0 11.142 47 .05 Intercept, Lancaster 144.038 145.0 18.250 17 .05 Intercept, Long Beach 130.445 145.0 10.228 56 .05 Intercept, Glendora 4.179 3.5 1.105 22 .05 Slope, Burbank 3.709 3.5 1.177 47 .05 Slope, Lancaster 3.749 3.5 1.866 17 .05 Slope, Long Beach 5.689 3.5 1.044 56 .05 Slope, Glendora ; PROC print; var b bstar se t df p CI_Lower CI_Upper Note; ID; title 'Test HO: regression parameter = value with CI'; run;