seeding.auto.stop: increments of iterative projections with automatic stopping

View source: R/seedCCA.R

seeding.auto.stopR Documentation

increments of iterative projections with automatic stopping

Description

Returns increments (nFu) of iterative projections of a seed matrix onto a covariance matrix upto k, which properly chosen by satisfying the terminating condition eps (eps can be selected by users).

Usage

seeding.auto.stop(seed, covx, n, u.max=30, eps=0.01)

Arguments

seed

numeric matrix (p * d), a seed matrix

covx

numeric matrix (p * p), covariance matrix of X

n

numeric, sample sizes

u.max

numeric, maximum number of projection. The default value is equal to 30.

eps

numeric, a value of a condition for terminating the projection. The default value is equal to 0.01.

Value

nFu

n*Fu values

u

the number of projection properly chosen by satisfying the terminating condition eps

Examples

data(cookie)
myseq<-seq(141,651,by=2)
X<-as.matrix(cookie[-c(23,61),myseq])
Y<-as.matrix(cookie[-c(23,61),701:704])
seed <- cov(X,Y)
covx <- cov(X)
seeding.auto.stop(seed, covx, n=dim(X)[1])
seeding.auto.stop(seed, covx, n=dim(X)[1], u.max=20, eps=0.001)

seedCCA documentation built on June 9, 2022, 9:05 a.m.