LAB2_sol - datalines Virginia $38,123 6,149 West Virginia $35,008 8,488 North Carolina $39,149 5,724 run r proc print data=salaries run r proc

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

View Full Document Right Arrow Icon
*-----------------------------------------------------* * PROGRAMMER: Randall Rieger * * PROGRAM: LAB2_sol.sas * * DATE: September 15, 2008 * * PURPOSE: Solutions to LAB2 * * DATA: Inputted Raw data and bears.txt * *-----------------------------------------------------*; TITLE1 "LAB2"; T * Set options, footnotes, form setting; options ps=60 ls=78 nodate pageno=1; o LIBNAME IN01 "C:\sta511\DATA"; L /*TASK 1*/ / data salaries; input STATE $ PAY SPEND ; datalines; Virginia $38,123 6,149 West Virginia $35,008 8,488 North Carolina $39,149 5,724 ; run; r proc print data=salaries; run; r /*TASK 2*/ / data salaries; input STATE $ 1-14 +2 PAY dollar7. +1 SPEND comma5. ; datalines; Virginia $38,123 6,149 West Virginia $35,008 8,488 North Carolina $39,149 5,724 ; run; r proc print data=salaries; run; r /* TASK 3 */ / data salaries; input STATE $ 1-14 +2 PAY dollar7. +1 SPEND comma5. +1 add_date mmddyy8. ;
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: datalines; Virginia $38,123 6,149 10/10/01 West Virginia $35,008 8,488 09/02/03 North Carolina $39,149 5,724 02/07/98 ; run; r proc print data=salaries; run; r proc contents data=salaries; run; r /*task4 */ / PROC PRINT DATA=SALARIES; FORMAT PAY SPEND DOLLAR8.; FORMAT ADD_DATE ddmmyy8.; RUN; R /* TASK 5 */ / proc plot data=salaries; plot pay*spend; run; quit; q proc gplot data=salaries; plot pay*spend; run; quit; q /* TASK 6 */ / PROC CORR data=salaries; VAR pay spend; RUN: quit; q /*TASK 2 */ /*simple list input is best*/ /* Note missing values for AGE */ / data BEARTEMP; infile 'e:/bears.txt'; input id age name $ sex neck length chest weight; i run; r proc contents DATA=BEARTEMP; run; r PROC print data=beartemp; run; r...
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

LAB2_sol - datalines Virginia $38,123 6,149 West Virginia $35,008 8,488 North Carolina $39,149 5,724 run r proc print data=salaries run r proc

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