|
Chapter Contents |
Previous |
Next |
| The NESTED Procedure |
In the following example from Snedecor and Cochran (1976), an experiment is conducted to study the variability of calcium concentration in turnip greens. Four plants are selected at random; then three leaves are randomly selected from each plant. Two 100-mg samples are taken from each leaf. The amount of calcium is determined by microchemical methods.
Because the data are read in sorted order, it is not necessary to use PROC SORT on the CLASS variables. Leaf is nested in Plant; Sample is nested in Leaf and is left for the residual term. All the effects are random effects. The following statements read the data and invoke PROC NESTED. These statements produce Output 44.1.1:
title 'Calcium Concentration in Turnip Leaves'
'--Nested Random Model';
title2 'Snedecor and Cochran, ''Statistical Methods'''
', 1976, p. 286';
data Turnip;
do Plant=1 to 4;
do Leaf=1 to 3;
do Sample=1 to 2;
input Calcium @@;
output;
end;
end;
end;
datalines;
3.28 3.09 3.52 3.48 2.88 2.80
2.46 2.44 1.87 1.92 2.19 2.19
2.77 2.66 3.74 3.44 2.55 2.55
3.78 3.87 4.07 4.12 3.31 3.31
;
proc nested;
class Plant Leaf;
var Calcium;
run;
Output 44.1.1: Analysis of Calcium Concentration
in Turnip Greens Using PROC NESTED|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.