lab3_sol - /* Questions 1-3 */ / proc freq data=temp;...

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

View Full Document Right Arrow Icon
/* RH Rieger */ /* September 17, 2006 */ /* LAB3.SAS */ /* Dataset = cereal.sas7bdat */ /* Introduce students to SAS Procedures */ /* Windows XP */ * options nodate ps=60 ls=78; o /* TASK #1 */ /* create 2 libname statements one for office directory one for class directory */ *libname office 'C:\sta511\'; libname class 'E:\sta511_05'; l /* TASK #2 */ proc contents data=class.cereal; run; r /* put data in a temporary file Why would I do this?*/ W data temp; set class.cereal; run; r /* task #3*/ / /* print out dataset */ / proc print data =class.cereal; run; r /* Find average amount of fiber */ proc means data=temp; var fiber; run; r /* What % of cereals are hot? */ proc freq data=temp; tables type; run; r /* TASK #4 */
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: /* Questions 1-3 */ / proc freq data=temp; tables type*lowcal type*lowfat lowcal*lowfat; run; r r /* TASK #5 */ / proc sort data=temp; by type; run; r proc univariate data=temp plots; var carbo; by type; run; r /*task #6*/ / proc means data=temp; var carbo; class type; run; r /*task #7*/ / data cer_temp; set temp (keep=name type carbo); run; proc print data=cer_temp; run; r /*task 8*/ / data one (keep=name fiber) two (keep=name carbo); set temp; run; r /*task 9*/ / proc sort data=temp; by name; run; r proc print data=temp; run; r Data class.cer_perm; set temp (firstobs=5 obs=10); run; r proc print data=class.cer_perm; run;...
View Full Document

This note was uploaded on 10/01/2009 for the course STA 511 taught by Professor Scottmcclintock during the Spring '09 term at West Chester.

Page1 / 2

lab3_sol - /* Questions 1-3 */ / proc freq data=temp;...

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