# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.factor.implicitmodelpca

## Class ImplicitModelPCA

• java.lang.Object
• com.numericalmethod.suanshu.stats.factor.implicitmodelpca.ImplicitModelPCA

• public class ImplicitModelPCA
extends Object
Given a (de-meaned) time series of vectored observations, we decompose them into a reduced dimension of linear sum of implicit factors. The factors are orthogonal. Specifically, we have $$R = \bar{R} + {B}'F + E$$ R is the time series of vectored observation. Its size is N x T. R_bar is the average of each subject's value over time, one entry per subject. It size is N. We copy the vector T times by columns to form a matrix for computation. F is the time series of factor values. Its size is K x T, where K is the number of implicit factors. B' is the matrix of factor loadings. Its size is N x K. Each row is the factor loadings for each subject. E is the residual matrix. In general, we have: The bigger T is, the more accurate B is. Assuming B is correct, the bigger N is, the more accurate F is; the smaller E (the noise) is, the more accurate F is. Therefore, we first need T big enough to accurately estimate B then need N big enough to accurately F (and E).
"Li, H, Ke, Y., "Using Explicit and Implicit Factors to Explain Stock Returns, 2017."
• ### Nested Class Summary

Nested Classes
Modifier and Type Class and Description
static class  ImplicitModelPCA.Result
the regression results
• ### Constructor Summary

Constructors
Constructor and Description
ImplicitModelPCA(Matrix R)
Constructs an implicit-model that will have one and only one implicit factors.
ImplicitModelPCA(Matrix R, double varExplained)
Constructs an implicit-model that will have the number of implicit factors such that the variance explained is bigger than a threshold
ImplicitModelPCA(Matrix R, int K)
Constructs an implicit-model that will have K implicit factors.
• ### Method Summary

All Methods
Modifier and Type Method and Description
ImplicitModelPCA.Result run()
Runs the regression.
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Constructor Detail

• #### ImplicitModelPCA

public ImplicitModelPCA(Matrix R,
int K)
Constructs an implicit-model that will have K implicit factors.
Parameters:
R - the time series of observations
K - the number of factors
• #### ImplicitModelPCA

public ImplicitModelPCA(Matrix R)
Constructs an implicit-model that will have one and only one implicit factors.
Parameters:
R - the time series of observations
• #### ImplicitModelPCA

public ImplicitModelPCA(Matrix R,
double varExplained)
Constructs an implicit-model that will have the number of implicit factors such that the variance explained is bigger than a threshold
Parameters:
R - the time series of observations
varExplained - the percentage of variance explained
• ### Method Detail

• #### run

public ImplicitModelPCA.Result run()
Runs the regression.
Returns:
the regression results