bp.error: calculate back-projection errors

Description Usage Arguments Details Value Author(s) References Examples

Description

Calculates the size of back-projection errors, based on errors of common principal components

Usage

1
2
3
bp.error(x,f,cpcmat, m, eigvar,
use="complete.obs",debug=FALSE,
center=TRUE)

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

cpcmat

common principal components matrix (if already computed)

m

matrix of mean values of variables by group (if already computed)

eigvar

variances of eigenvalues (if already computed)

use

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

debug

(logical) print debugging information?

center

center group means on grand mean?

Details

Uses CPC, variances of CPC (eigenvector) components, and means of groups to calculate total back-projection errors in variables. If cpcmat is not provided, calls cpcvecfun to compute CPC; if eigvar is not provided, calls calc.cpcerr to calculate variances on eigenvalues.

Value

If new=TRUE, a matrix of back-projection errors by variable and group; otherwise, a vector of total back-projection errors in each variable.

Author(s)

Ben Bolker

References

Flury

Examples

1
2
3
   set.seed(1001)
   X <- simdata(npts=100)
   bp.error(X)

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