









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










OPTIONS pagesize=50 linesize=64;
DATA bankdata; INPUT salary gender $ @@; LABEL salary = "Starting Salary" gender = "m=male, f=female"; CARDS; 3900 f 4020 f 4290 f 4380 f 4380 f 4380 f 4380 f 4380 f 4440 f 4500 f 4500 f 4620 f 4800 f 4800 f 4800 f 4800 f 4800 f 4800 f 4800 f 4800 f 4800 f 4800 f 4980 f 5100 f 5100 f 5100 f 5100 f 5100 f 5100 f 5160 f 5220 f 5220 f 5280 f 5280 f 5280 f 5400 f
KEEP salary; WHERE gender='m'; RUN;
DATA female; SET bankdata; KEEP salary; WHERE gender='f'; RUN;
PROC PRINT DATA=female; TITLE "Female Salaries"; RUN;
PROC UNIVARIATE DATA=female PLOT FREQ ; VAR salary; TITLE 'Summary of the Female Salaries'; RUN;
OPEN female; DIST salary; RUN;
QQ Ref Line...
Section 7.2 and Supplement 7 - Confidence Intervals for Means and Variances
DATAINPUT examp7p2; numb_chars @@; CARDS;1.13 1.55 1.43 0.92 1.25 1.36 1.32 0. 1.07; 1.48 1.20 1.33 1.18 1.22 1.
PROCOPEN INSIGHT;examp7p2; DIST numb_chars; RUN;
Section 7.3 - Confidence Interval for One Proportion
DATA pinterval; INPUTphat =x x/n;n confcoeff; pstaralpha == (x+2)/(n+4);1-confcoeff; zalphaover2 = PROBIT(1-alpha/2); plusorminus=zalphaover2sqrt(pstar(1-pstar)/(n+4));lower=pstar-plusorminus; upper=pstar+plusorminus;KEEP x n confcoeff pstar plusorminus lower upper; CARDS;3 200 0. ; PROCRUN; PRINT DATA=pinterval;
Section 8.4 - One Sample t-test
DATA examp8p4; INPUTCARDS; hstays @@; 2 3 8 6 4 4 6 4 2 5 (^81 103 42 43 44 23 15 32 24 ) (^21 91 11 73 171 96 93 93 42 ) 1 3 3 14 2 3 9 6 6 3 (^52 12 45 64 113 226 11 95 61 ) (^173 15 22 43 53 42 410 32 24 ) ; PROC INSIGHT; OPENDIST examp8p4;hstays; RUN;
ptwosideCARDS; = 2*MIN(1-ABS(PROBNORM(z)),ABS(PROBNORM(z))); 10 300;. PROC PRINT DATA=ptest; RUN;
Section 9.1 - Two Sample t-test
DATA examp9p4; INPUT group $ value @@; CARDS; new 80 new 80 new 79 new 81 stand 79 stand 62 stand 70 stand 68 new 76 new 66 new 71 new 76 stand 73 stand 76 stand 86 stand 73 new 70 new 85 stand 72 stand 68 stand 75 stand 66 ;
PROC TTEST DATA=examp9p4; CLASS group; VAR value; RUN;
OPEN examp9p4; RUN;
Section 9.2 - Paired t-test
DATA learner; INPUT new standard; CARDS; 77 72 74 68 82 76 73 68 87 84
PROCRUN; PRINT DATA=test2p;
Section 10.2 - One-way Analysis of Variance
DATA iron; INPUTCARDS; brand $ dist @@; AA 251.2245.1 BB 263.2262.9 CC 269.7263.2 DD 251.6248. AA 248.0251.1 BB 265.0254.5 CC 277.5267.4 DD 249.4242. A 260.5 B 264.3 C 270.5 D 246. AA 250.0253.9 BB 257.0262.8 CC 265.5270.7 DD 251.3261. A 244.6 B 264.4 C 272.9 D 249. AA 254.6248.8 BB 260.6255.9 CC 275.6266.5 DD 247.1245. ; PROC INSIGHT; OPENFIT dist iron; = brand; RUN;
PROC GLM DATA=iron; CLASSMODEL brand;dist=brand; RUN;
Chapter 11 and Supplements - Simple Linear Regression
DATAINPUT stimulus; amount_x reaction_y; CARDS; (^12 ) (^34 ) 5 4 ; PROCOPEN INSIGHT;stimulus; FIT reaction_y = amount_x; RUN;
PROCMODEL GLM reaction_y = amount_x / ALPHA=0.05 CLI; DATA=stimulus; RUN; PROC GLM DATA=stimulus; MODELRUN; reaction_y = amount_x / ALPHA=0.05 CLM;
None D 18 A Never 172 B Never 61 C Never 44 D Never 70 None Never 37 ;
PROC FREQ DATA=ex13p3; WEIGHT count; TABLES rel*marit / chisq expected nopercent; RUN;
The Text Book Data
Computer Trouble?