hw3-2 code

hw3-2 code - =corn plot ; RUN ; Data cornif; Set corn; if...

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

View Full Document Right Arrow Icon
*Second problem Data corn ; input year $ yield $ rain; label year= 'year from 1909 to 1927’ yield= ' yearly corn yield in bushels per acre, in six Corn Belt states(Iowa, Illinois, Nebraska, Missouri, Indiana, and Ohio) ' rain= ’rainfall measurements in inches, in the six states’; title 'Records of corn yield and rainfall measurements' ; datalines ; 1909 32.3 12.0 1910 34.9 9.3 1911 30.1 7.7 1912 36.9 11.0 1913 26.8 6.9 1914 30.5 9.5 1915 33.3 16.5 1916 29.7 9.3 1917 35.0 9.4 1918 29.9 8.7 1919 35.2 9.5 1920 38.3 11.6 1921 35.2 12.1 1922 35.5 8.0 1923 36.7 10.7 1924 26.8 13.9 1925 38.0 11.3 1926 31.7 11.6 1927 32.6 10.4 ; 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
PROC MEANS DATA =corn; run ; PROC MEANS data =corn; min max nmiss var t ; By year; var yield rain; title 'Records of corn yield and rainfall measurements ' ; run ; PROC UNIVARIATE DATA
Background image of page 2
Background image of page 3

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

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

Unformatted text preview: =corn plot ; RUN ; Data cornif; Set corn; if yield < 32 then catyield = poor; if yield >= 32 then catyield = good; data cornif2; set corn; if rain < = 9.7 then catrain = drought; if 9.7 < rain < = 12 then catrain = normal; if rain >12 then catrain = wet; run; DATA cornif3; MERGE cornif cornif2; BY year; PROC PRINT DATA =cornif3; RUN ; proc freq data =cornif; title 'Records of corn yield and rainfall measurements ' ; run ; proc freq data =cornif3; tables catyeild year*catyield catrain*year; run ; proc chart data =cornif3; vbar catyield/ subgroup =catrain; title1 'Records of corn yield and rainfall measurements ' ; run ; proc plot data =cornif; plot yield*rain=#; run ;...
View Full Document

Page1 / 4

hw3-2 code - =corn plot ; RUN ; Data cornif; Set corn; if...

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

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