anova.mean: ANOVA table from the group sample sizes, means, and standard...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/anova.mean.R

Description

Oneway ANOVA table from the summary information consisting of group sample sizes, means, and standard deviations. The full dataset is not needed.

Usage

1
anovaMean(object, n, ybar, s, ..., ylabel = "ylabel")

Arguments

object

level names

n

sample size for each level

ybar

sample mean for each level

s

sample standard deviation for each level

...

other arguments (not used)

ylabel

name of response variable

Value

Analysis of variance table, identical to the ANOVA table that would have been produced by anova.lm if the original data, rather than the summary data, had been available.

Author(s)

Richard M. Heiberger <rmh@temple.edu>

See Also

anova.lm, plot.mmc.multicomp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## pulmonary data used in Hsu and Peruggia paper defining the mean-mean plot
## See ?plot.mmc.multicomp for details on the dataset.

data(pulmonary)

anovaMean(pulmonary$smoker,
          pulmonary$n,
          pulmonary$FVC,
          pulmonary$s,
          ylabel="pulmonary")

Example output

Loading required package: lattice
Loading required package: grid
Loading required package: latticeExtra
Loading required package: RColorBrewer
Loading required package: multcomp
Loading required package: mvtnorm
Loading required package: survival
Loading required package: TH.data
Loading required package: MASS

Attaching package: 'TH.data'

The following object is masked from 'package:MASS':

    geyser

Loading required package: gridExtra
Analysis of Variance Table

Response: pulmonary

Terms added sequentially (first to last)
            Df Sum of Sq Mean Sq F value     Pr(F)    
pulmonary    5    89.266 17.8531  83.928 < 2.2e-16 ***
Residuals 1044   222.080  0.2127                      
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Warning message:
In ybar - (ybar %*% n)/sum(n) :
  Recycling array of length 1 in vector-array arithmetic is deprecated.
  Use c() or as.vector() instead.

HH documentation built on Nov. 28, 2020, 9:06 a.m.

Related to anova.mean in HH...