Analyzes a one-way classification model.
NI — Vector of length NGROUP containing the number of responses for each group. (Input)
Y — Vector of length NI(1) + NI(2) + L + NI(NGROUP) containing the responses for each group. (Input)
AOV — Vector of length 15 containing statistics relating to the analysis of variance. (Output)
I AOV(I)
1 Degrees of freedom for among groups
2 Degrees of freedom for within groups
3 Total (corrected) degrees of freedom
4 Sum of squares for among groups
5 Sum of squares for within groups
6 Total (corrected) sum of squares
7 Among-groups mean square
8 Within-groups mean square
9 F -statistic
10 p-value
11 R2 (in percent)
12 Adjusted R2 (in percent)
13 Estimated standard deviation of the error within groups
I AOV(I)
14 Overall mean of Y
15 Coefficient of variation (in percent)
NGROUP — Number
of groups. (Input)
Default: NGROUP
= size (NI,1).
IPRINT — Printing
option. (Input)
Default: IPRINT
= 0.
IPRINT Action
0 No printing is performed.
1 AOV is printed only.
2 STAT is printed only.
3 All printing is performed.
STAT — NGROUP
by 4 matrix containing information concerning the groups. (Output)
Row I
contains information pertaining to the I-th
group. The information in the columns is as follows:
Col. Description
1 Group number
2 Number of nonmissing observations
3 Group mean
4 Group standard deviation
LDSTAT — Leading
dimension of STAT
exactly as specified in the dimension statement in the calling
program. (Input)
Default: LDsTAT=
size (STAT
, 1)
NMISS — Number of
missing values. (Output)
Elements of Y
containing NaN (not a number) are omitted from the computations.
Generic: CALL AONEW (NI, Y, AOV [,…])
Specific: The specific interface names are S_AONEW and D_AONEW.
Single: CALL AONEW (NGROUP, NI, Y, IPRINT, AOV, STAT, LDSTAT, NMISS)
Double: The double precision name is DAONEW.
Routine AONEW performs an analysis of variance of responses from a one-way classification design. The model is
yij = μi + ɛ ij i = 1, 2, …, k; j = 1, 2, …, ni
where the observed value of yij constitutes the j-th response in the i-th group, μi denotes the population mean for the i-th group, and the ɛ ij's are errors that are identically and independently distributed normal with mean zero and variance σ2. AONEW requires the yij's as input into a single vector Y with responses in each group occupying contiguous locations. The analysis of variance table is computed along with the group sample means and standard deviations. A discussion of formulas and interpretations for the one-way analysis of variance problem appears in most elementary statistics texts, e.g., Snedecor and Cochran (1967, Chapter 10).
This example computes a one-way analysis of variance for data discussed by Searle (1971, Table 5.1, pages 165−179). The responses are plant weights for 6 plants of 3 different types−3 normal, 2 off-types, and 1 aberrant. The responses are given by type of plant in the following table:
|
Type of Plant | ||
|
Normal |
Off-Type |
Aberrant |
|
101 |
84 |
32 |
|
105 |
88 |
|
|
94 |
|
|
Note that for the group with only one response, the standard deviation is undefined and is set to NaN (not a number).
USE AONEW_INT
IMPLICIT NONE
INTEGER NGROUP, NOBS
PARAMETER (NGROUP=3, NOBS=6)
!
INTEGER IPRINT, NI(NGROUP)
REAL AOV(15), Y(NOBS)
!
DATA NI/3, 2, 1/
DATA Y/101.0, 105.0, 94.0, 84.0, 88.0, 32.0/
!
IPRINT = 3
CALL AONEW (NI, Y, AOV, IPRINT=IPRINT)
END
Dependent R-squared Adjusted Est. Std.
Dev.
Coefficient of
Variable (percent) R-squared of Model
Error Mean Var.
(percent)
Y
98.028
96.714
4.83
84
5.751
* * * Analysis of Variance * *
*
Sum of
Mean
Prob.
of
Source
DF Squares Square
Overall F Larger F
Among
Groups
2 3480
1740.0 74.571 0.0028
Within
Groups
3
70 23.3
Corrected
Total
5
3550
Group
Statistics
Standard
Group
N Mean
Deviation
1
3
100 5.568
2
2
86 2.828
3
1
32 NaN
|
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |