calc.cpcerr: Calculate errors of CPC eigenvectors

Description Usage Arguments Value Author(s) Examples

Description

Use Flury's formulas to calculate variance-covariance matrix of first CPC eigenvector components (or variances of all CPC eigenvector components)

Usage

1
calc.cpcerr(x, f, cpcmat = NULL,  calc.cov = TRUE, use="complete.obs")

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

CPC matrix

calc.cov

(logical) calculate variance-covariance matrix of elements of first eigenvector?

use

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

Value

Either (if calc.cov==TRUE) the variance-covariance matrix of the elements of the first common principal component eigenvector, or (if calc.cov==FALSE) the variances of the elements of all of the CPC values

Author(s)

Ben Bolker

Examples

1
2
3
  X=simdata(npts=200)
  calc.cpcerr(X)
  calc.cpcerr(X,calc.cov=FALSE)

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