Quiz 20.docx

# Quiz 20.docx - Q6(dataset SASHELP.BWEIGHT Create a dataset...

• No School
• AA 1
• 14

This preview shows page 1 - 4 out of 14 pages.

Q6 (dataset: SASHELP.BWEIGHT) Create a dataset including first 2,000 observations only in  SASHELP.BWEIGHT and report the p-value of testing if two variables MomSmoke and VISIT are  independent. Note that you should determine if Chi-sq test is valid or not. Up to four decimal place,  please. (Hint: use PROC FREQ) Code: data bweight; set sashelp.bweight (obs=2000); run;              proc freq data=bweight; tables visit*MomSmoke / chisq;            exact fisher;              run; Result: The SAS System The FREQ Procedure Frequency Percent Row Pct Col Pct Table of Visit by MomSmoke Visit(Prenatal Visit) MomSmoke(Smoking Mother) 0 1 Total 0 14 0.70 73.68 0.80 5 0.25 26.32 1.97 19 0.95 1 206 10.30 79.84 11.80 52 2.60 20.16 20.47 258 12.90 2 32 1.60 84.21 1.83 6 0.30 15.79 2.36 38 1.90 3 1494 74.70 88.66 85.57 191 9.55 11.34 75.20 1685 84.25
Table of Visit by MomSmoke Visit(Prenatal Visit) MomSmoke(Smoking Mother) 0 1 Total Total 1746 87.30 254 12.70 2000 100.00 Statistics for Table of Visit by MomSmoke Statistic DF Value Prob Chi-Square 3 19.2676 0.0002 Likelihood Ratio Chi-Square 3 17.0230 0.0007 Mantel-Haenszel Chi-Square 1 19.2130 <.0001 Phi Coefficient 0.0982 Contingency Coefficient 0.0977 Cramer's V 0.0982 WARNING: 25% of the cells have expected counts less than 5. Chi-Square may not be a valid test. Fisher's Exact Test Table Probability (P) <.000 1 Pr <= P 0.0003 Sample Size = 2000 Answer: 0.0003 Q7 (dataset: SASHELP.BWEIGHT) Consider the following model: Using all 5,000 observations in SASHELP.BWEIGHT, report the test statistic (F Value) of comparing  VISIT=0 vs VISIT>=1. Up to two decimal place, please. (Hint: Use CONTRAST statement.) Code: data bweight; set sashelp.bweight; run ; proc glm data =bweight; class visit;
model weight=visit; means visit / tukey ; contrast " never vs. at least 1" visit 3 - 1 - 1 - 1 ; run ; quit ; Result: The SAS System The GLM Procedure

Want to read all 14 pages?

Want to read all 14 pages?

#### You've reached the end of your free preview.

Want to read all 14 pages?

• Fall '19
• Multiple comparisons, SAS System

{[ snackBarMessage ]}

Upload your study materials now and get free access to over 25 million documents.

Upload now for FREE access Or pay now for instant access
###### "Before using Course Hero my grade was at 78%. By the end of the semester my grade was at 90%. I could not have done it without all the class material I found."
— Christopher R., University of Rhode Island '15, Course Hero Intern

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern