Moisture Content of Wheat Grain: Statistical Analysis with PROC MEANS and PROC UNIVARIATE, Schemes and Mind Maps of Statistics

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

2021/2022

Uploaded on 09/27/2022

marcyn
marcyn 🇬🇧

4.3

(12)

226 documents

1 / 18

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Getting What You Want from
PROC MEANS and
PROC UNIVARIATE
Marjorie Smith, Cereal Research Centre
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12

Partial preview of the text

Download Moisture Content of Wheat Grain: Statistical Analysis with PROC MEANS and PROC UNIVARIATE and more Schemes and Mind Maps Statistics in PDF only on Docsity!

Getting What You Want from

PROC MEANS and

PROC UNIVARIATE

Marjorie Smith, Cereal Research Centre

PROC MEANS

  • provides data summarization tools to compute

descriptive statistics for variables

  • across all observations
  • within groups of observations

PROC UNIVARIATE

  • Used to explore the data distributions of variables
    • summarize, visualize, analyze, and model the statistical distributions of numeric variables

Data set input and format

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

  • fw = field width (default is 12)
  • Maxdec = number of decimal places shown

proc means data=a n mean var

fw=8 maxdec=3;

by ht;

class rh day;

var mc;

Each BY group produces a

separate table

Output data sets

• Use the OUTPUT statement to:

– Have greater control over how the output data looks

– Save the output statistics to a SAS data set you can

manipulate

– Use more that one OUTPUT statement to create several

OUT= data sets

• If you only want the OUT= data set, use the NOPRINT

option in the PROC MEANS statement

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;

The available keywords

to include in the

PROC statement

Specifies which

statistics to compute

and the order to

display them in the

output

(list from SAS 9.2 documentation – PROC MEANS)

TESTING FOR RESISTANCE TO WHEAT MIDGE IN

SEVERAL WHEAT LINES

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….

  • position = position in cage
  • instar2 = second stage larvae
  • instar3 = third stage larvae
  • dead = dead larvae

PROC UNIVARIATE

  • descriptive statistics:
    • Moments, quantiles or percentiles, frequency tables, extreme values
  • histograms
  • goodness-of-fit tests for a variety of distributions
  • create output data sets containing summary statistics, histogram intervals, and parameters of fitted curves
  • An important first step in data analysis:
    • find key features of distributions
    • identify outliers and extreme observations
    • determine the need for data transformations
    • compare distributions

(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;

  • Uses Output Delivery System to select specific tables or graphics to display
  • Calculates the weighted mean
  • ‘Details’ under ‘The UNIVARIATE Procedure’ gives a list of ODS table names and contents