assignment5 - q proc ttest data=chol; class smoke; var...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
* Assignment 5; dm 'log;clear;output;clear;'; options ps=50 ls=75 pageno=1; o * Question a; data cholc; infile 'K:\6360\Assignments\Assignment5\cholc.txt' firstobs=5; input id Exercise $ Smoke $; run; quit; q data chola; infile 'K:\6360\Assignments\Assignment5\chola.txt' firstobs=6; input id Trt $ Cholred @@; clinic='T'; run; quit; q data cholb; infile 'K:\6360\Assignments\Assignment5\cholb.txt' firstobs=4; input id trt $ before after; clinic='C'; Cholred=before-after; drop before after; run; quit; q * Question b; proc sort data=chola; by id; run; quit; q proc sort data=cholb; by id; run; quit; q proc sort data=cholc; by id; run; quit; q data chol; merge chola cholb cholc; by ID; if cholred='.' then delete; run; quit; q * Question c; proc means data=chol; class TRT; var cholred; run; quit; q proc glm data=chol; class TRT;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
model cholred=trt; means trt / tukey ; run; quit; q * Question d; proc ttest data=chol; class exercise; var cholred; run; quit;
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: q proc ttest data=chol; class smoke; var cholred; run; quit; q * Question e; proc glm data=chol; class smoke exercise; model cholred = smoke exercise smoke*exercise; run; quit; q proc means data=chol noprint nway; class smoke exercise; var cholred; output out=meanchol mean=mean_chol; run; r goptions reset=all; title2 'Cholestrol vs. Exercise for Smoke'; proc gplot data=meanchol; plot mean_chol*exercise=smoke / vaxis=axis1 haxis=axis2 grid legend=legend1; axis1 label = (a=90 'Mean Cholestrol'); axis2 label = ('Exercise') minor = none; symbol1 v=circle i=j ci=red l=1; symbol2 v=star i=j ci=blue l=2; legend1 label = ('Smoke') down = 1 across = 2 position = (bottom center outside); run; * Question f; proc freq data=chol; tables smoke*exercise /chisq; run; quit; ***********************************************...
View Full Document

This note was uploaded on 06/06/2011 for the course STAT 4360 taught by Professor Park during the Spring '11 term at University of Georgia Athens.

Page1 / 2

assignment5 - q proc ttest data=chol; class smoke; var...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online