dm 'log;clear;output;clear'; options nodate nocenter nonumber ls=90 ps=56 nolabel FORMCHAR="|----|+|---+=|-/\<>*"; ODS listing; ods graphics on; ods html close; ods html style=minimal body='Lab 05 Output.html'; ************************************; *** James P Geaghan ***; *** EXST 7005 Chi Square Example ***; *******************************************************************************; *** Barbara Ann Baisley. 2010. After School Care Arrangements And Student ***; *** Academic Performance And Misbehavior In Middle School. Ph. D. ***; *** Dissertation in Education, George Mason University, Fairfax, VA. ***; *******************************************************************************; title1 "Student failures and after school care type"; ******************************************; *** Assignment 05 Example: Failures ***; ******************************************; title2 "Effect of perception of the Failures of CareType choice"; data Failures; length CareType $ 12; INFILE 'Child care (Failures).csv' dlm=',' dsd missover firstobs=2; input CareType $ Failures $ Students; datalines; run; ; run; *proc print data=Failures; run; proc freq data=Failures order=data; Title3 'Two-way frequencies of CareType and Failures'; table CareType * Failures; run; proc freq data=Failures order=data; weight Students; Title3 'Two-way frequencies of CareType and Failures'; table CareType * Failures; run; proc chart data=Failures; Title4 'Histogram (horizontal) of Failures and CareType'; hbar CareType / subgroup=Failures sumvar=Students midpoints = "Relative" "Non-Relative" "Center" "Self" "Parent" "Multiple"; run; proc freq data=Failures order=data; weight Students; Title3 'Two-way frequencies of CareType and Failures'; table CareType * Failures / norow nocol nopercent chisq expected cellchi2; run; proc freq data=Failures order=data; weight Students; Title3 'One-way frequencies of CareType'; Title4 'Test is for equal proportions if alternative is not provided'; table CareType / chisq expected cellchi2; run; proc freq data=Failures order=data; weight Students; Title3 'One-way frequencies of Failures'; Title4 'Test to see if failures are equal to 10% (1:9 ratio)'; table Failures / nocum chisq testp=(10 90); run;