










Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An overview of using SAS procedures PROC MEANS and PROC UNIVARIATE to analyze moisture content of wheat grain harvested at different maturities and stored under various conditions. It covers data input, format, and the use of PROC MEANS for computing descriptive statistics and PROC UNIVARIATE for exploring data distributions.
Typology: Schemes and Mind Maps
1 / 18
This page cannot be seen from the preview
Don't miss anything!











proc format;
value $fht 'E'='early' 'L'='late' 'N'='normal';
data a;
infile 'example_data.txt' dlm='09'x dsd firstobs=4 missover; input day rh ht $ rep mc; label rh='% RH' ht='harvest time' mc='% moisture'; format ht fht.;
title 'MOISTURE CONTENT OF WHEAT GRAIN HARVESTED AT DIFFERENT MATURITIES';
title2 'AND STORED UNDER VARIOUS CONDITIONS';
proc means data=a fw=8; var mc;
proc means data=a;
proc means data=a n mean var fw=8 maxdec=3;
class ht rh day; var mc;
CLASS statement Statistics for groups listed in one table
Formatting
proc means data=a alpha=0.05 mean lclm uclm noprint;
by ht rh; var mc; output out=out1 n=n mean=MeanMoistureContent lclm=LowerLimit uclm=UpperLimit;
proc print;
(list from SAS 9.2 documentation – PROC MEANS)
line position instar2 instar3 dead 3001 19 0 37 3 3001 19 1 50 3 3001 11 4 14 14 3001 11 2 0 8 3002 22 0 0 1 3002 22 0 0 6 3002 18 0 0 0 3002 18 0 0 3 3040 25 1 46 2 3040 25 0 50 0 3040 16 0 50 0 3040 16 0 50 0 3024 4 2 30 11 3024 4 1 50 2 ….more data lines….
(summarized from SAS 9.2 documentation – PROC UNIVARIATE)
/* WTS.(g) OF UNDAMAGED SEED IN WHEAT SPIKES */
ods select Moments BasicMeasures Plots;
proc univariate data=a plot nobyplot vardef=weight; by entry notsorted; var undam_kwt; weight undam; run;