assignment2 - r /*solution to Q3*/ / *a; *Imports the Excel...

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

View Full Document Right Arrow Icon
/* Assignment 2*/ / dm 'log;clear;output;clear;'; options ps=50 ls=75 pageno=1; o /* Solution to Q1 */ Proc freq data=SASdata.titanic; tables survived; *Answer to (a); tables class*survived; *Answer to (b); tables class*sex*survived; *Answer to (c); run; quit; q /* Solution to Q2 */ data forlang; set SASdata.forlang; combine=english+math; drop=GPA8th-GPA12th; if combine > 152 then award='Y'; else award='N'; math1=math-70; run; quit; *a); Proc means data=forlang mean median std clm alpha=0.1; var combine; run; quit; *b); proc means data=forlang; class foreign; var english; run; r *c); proc means data=forlang mean std; class varsity; * find the mean and std in each group; var drop; run; r *d); proc means data=forlang t probt; var math1; run; r *e); proc univariate data=forlang plots; var math english; run; r *f); proc freq data=forlang; tables award; run;
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: r /*solution to Q3*/ / *a; *Imports the Excel file; PROC IMPORT OUT= FieldGoal DATAFILE= "K:\6360\Assignments\Assignment2\FG_data.xls" DBMS=EXCEL2000 REPLACE; GETNAMES=YES; RUN; R *SAS did not import the data set perfectly! *The stadium variable had a LABEL created called stadium; *The actual name of the variable in the data set was _stadium; data FieldGoal; set FieldGoal; stadium = _stadium; drop _stadium; run; r *Print the above dataset ; proc print data=FieldGoal (obs=10); run; r *b; proc freq data=FieldGoal ; tables Success*Surface / fisher out=out_Set1; run; r proc print data=out_Set1; run; r *c; proc freq data=FieldGoal; tables Success*stadium / chisq norow nocol nopercent cellchi2; output out=out_Set2 chisq; run; r proc print data=out_Set2; run;...
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

assignment2 - r /*solution to Q3*/ / *a; *Imports the Excel...

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