SAPC: The stochastic approximate component method can handle online...

View source: R/SAPC.R

SAPCR Documentation

The stochastic approximate component method can handle online data sets.

Description

The stochastic approximate component method can handle online data sets.

Usage

SAPC(data, m, eta, alpha)

Arguments

data

is a online data set

m

is the number of principal component

eta

is the proportion of online data to total data

alpha

is the step size

Value

T2,T2k,V,Vhat,lambdahat,time

Examples

library(MASS)
n=2000;p=20;m=9;
mu=t(matrix(rep(runif(p,0,1000),n),p,n))     
mu0=as.matrix(runif(m,0))
sigma0=diag(runif(m,1))
F=matrix(mvrnorm(n,mu0,sigma0),nrow=n)
A=matrix(runif(p*m,-1,1),nrow=p)
D=as.matrix(diag(rep(runif(p,0,1))))
epsilon=matrix(mvrnorm(n,rep(0,p),D),nrow=n)
data=mu+F%*%t(A)+epsilon
SAPC(data=data,m=m,eta=0.8,alpha=1) 

OPC documentation built on May 31, 2023, 8:50 p.m.

Related to SAPC in OPC...