var.exp {OLCPM}R Documentation

explanatory power of factors

Description

This function calculates the cumulative explanatory power of the leading row factors, in terms of the explained variance, under a two-way factor structure.

Usage

var.exp(Y, k = 2, type = "proj", kmax = 4, plot = 0)

Arguments

Y

data, a T\times p1\times p2 array.

k

a positive integer indicating the number of factors investigated, should be smaller than p1.

type

indicates how to calculate the sample covariance. "flat" for the flat version, while others for the projected version.

kmax

a positive integer smaller than p2, indicating the upper bound for the factor numbers, and the dimension of projection matrix.

plot

a logical value. When plot=1, a figure of the cumulative explanatory power will be plotted, with x axis being the number of factors, and y axis being the cumulative explained variance.

Value

a vector with k entries, corresponding to the cumulative explanatory power of the leading k factors.

Examples

k1=3
k2=3
Sample_T=100
p1=40
p2=20

Y=gen.data(Sample_T,p1,p2,k1,k2,tau=0.5,change=0)
var.exp(Y,k=5,plot=1)


[Package OLCPM version 0.1.1 Index]