bp.anova: Analysis of variance incorporating back-projection error

Description Usage Arguments Details Value Note Author(s) Examples

Description

Does an one-way analysis of variance of multiple variables, incorporating a term for back-projection variance in the error term

Usage

1
2
bp.anova(x, f, verbose = FALSE, use="complete.obs",debug=FALSE,
center=TRUE, nsim=10000)

Arguments

x

a numeric matrix (or data frame with all numeric values, or (if f is missing) a list of a data matrix and a grouping variable

f

a factor describing the group structure of the data

verbose

(logical) return more information about ANOVA?

use

method for missing observations when computing covariances (see cov for details)

debug

(logical) print debugging information?

center

center groups before back-projecting?

nsim

number of simulations for $p$-value calculation

Details

Back-projects the data; runs ANOVA on each variable; then recomputes the $p$-value by simulating the distribution.

Value

If verbose=FALSE, a list of anova objects (one for each variable) representing a one-way ANOVA for each variable. Otherwise, a list:

alist

ANOVA list

bp

back-projected data

cpc.evecs

CPC eigenvectors

Note

It is the USER'S RESPONSIBILITY to check that the groups in the data actually share a common principal component!

Author(s)

Ben Bolker

Examples

1
2
3
4
5
6
7
8
9
   X = simdata(npts=200)
   plot_multigrp(X)
   a1 <- bp.anova(X)
   bp.pvals(a1)
   Y = simdata(npts=200,offset2=2)
   plot_multigrp(Y)
   a2 <- bp.anova(Y,verbose=TRUE,nsim=20000)
   bp.pvals(a2$alist)
   plot_multigrp(a2$bp,Y$f)

bbolker/cpcbp documentation built on May 11, 2019, 9:28 p.m.