Learn R Programming

phtt (version 3.1.2)

OptDim: Estimation of the Factor Dimension

Description

Functions for the Estimation of the Factor Dimension

Usage

OptDim(Obj, criteria = c("PC1", "PC2", "PC3", "BIC3", "IC1", "IC2", "IC3", "IPC1","IPC2", "IPC3", "ABC.IC1", "ABC.IC2", "KSS.C", "ED", "ER", "GR"), standardize = FALSE, d.max, sig2.hat, spar, level = 0.01, c.grid = seq(0, 5, length.out = 128), T.seq, n.seq)

Arguments

Obj
The function requires either a Txn matrix or an object with class "`Eup"' or "`KSS"'.
criteria
A character vector that contains the desired criteria to be used. If it is left unspecified, the function returns the result of all 16 criteria.
standardize
logical. If TRUE the input variable will be standardized. Default is FALSE.
d.max
Maximal dimension used in the dimensionality-criteria of Bai (2009). The default (d.max=NULL) yields to an internal selection of d.max.
sig2.hat
The squared standard deviation of the error-term required for the computation of some dimensionality criteria. The user can specify it in instead of d.max. The default (sig2.hat=NULL) yields to an internal estimation.
spar
Smoothing parameter used to calculate the criterion of Kneip, Sickles, and Song (2012). The default is NULL, which leads to internal computation.
level
The significance level used for the criterion of Kneip, Sickles, and Song (2012). The default is 0.01.
c.grid
Required only for computing "ABC.IC1" and "ABC.IC2". It specifies the grid interval in which the scaling parameter of the penalty terms in "ABC.IC1" and "ABC.IC2" are calibrated. Default is c.grid =seq(0, 5, length.out = 128).
T.seq
Required only for computing "ABC.IC1" and "ABC.IC2". It can be a vector containing different dimensions for T or an integer indicating the length of the sequence to be considered in calibrating "ABC.IC1" and "ABC.IC2". If it is left unspecified, the function determines internally a sequence of the form seq((T-C), T), where C is the square root of min{T,900}.
n.seq
Required only for computing "ABC.IC1" and "ABC.IC2". It can be a vector containing different dimensions for n or an integer indicating the length of the sequence to be considered in calibrating "ABC.IC1" and "ABC.IC2". If it is left unspecified, the function determines internally a sequence of the form seq((n-D), n), where D is the square root of min{n,900}.

Value

'OptDim' returns an object of 'class' '"OptDim"' containing a list with the following components:
criteria:
The name of the criteria specified by the user.
PC1:
If specified in criteria a table is returned with the optimal dimension, the empirical standard deviation of the residuals, and some other informations required internally by the criterion, such as d.max and/ or sig2.hat.
PC2:
If specified in criteria a table is returned with the optimal dimension, the empirical standard deviation of the residuals, and some other informations required internally by the criterion, such as d.max and/ or sig2.hat.
PC3:
If specified in criteria a table is returned with the optimal dimension, the empirical standard deviation of the residuals, and some other informations required internally by the criterion, such as d.max and/ or sig2.hat.
IC1:
If specified in criteria a table is returned with the optimal dimension, the empirical standard deviation of the residuals, and some other informations required internally by the criterion, such as d.max.
IC2:
If specified in criteria a table is returned with the optimal dimension, the empirical standard deviation of the residuals, and some other informations required internally by the criterion, such as d.max.
IC3:
If specified in criteria a table is returned with the optimal dimension, the empirical standard deviation of the residuals, and some other informations required internally by the criterion, such as d.max.
IPC1:
If specified in criteria a table is returned with the optimal dimension, the empirical standard deviation of the residuals, and some other informations required internally by the criterion, such as d.max and/ or sig2.hat.
IPC2:
If specified in criteria a table is returned with the optimal dimension, the empirical standard deviation of the residuals, and some other informations required internally by the criterion, such as d.max and/ or sig2.hat.
IPC3:
If specified in criteria a table is returned with the optimal dimension, the empirical standard deviation of the residuals, and some other informations required internally by the criterion, such as d.max and/ or sig2.hat.
KSS.C:
If specified in criteria a table is returned with the optimal dimension, the empirical standard deviation of the residuals, and some other informations required internally by the criterion, such as d.max and/ or sig2.hat.
ED:
If specified in criteria a table is returned with the optimal dimension, the empirical standard deviation of the residuals, and some other informations required internally by the criterion, such as d.max.
ER:
If specified in criteria a table is returned with the optimal dimension, the empirical standard deviation of the residuals, and some other informations required internally by the criterion, such as d.max.
GR:
If specified in criteria a table is returned with the optimal dimension, the empirical standard deviation of the residuals, and some other informations required internally by the criterion, such as d.max.
summary:
A table (in a matrix form) containing all the estimated dimensions obtained by the specified criteria.
BaiNgC:
A logical vector required for further internal computations.
BaiC:
A logical vector required for further internal computations.
KSSC:
A logical vector required for further internal computations.
OnatC:
A logical vector required for further internal computations.
RHC:
A logical vector required for further internal computations.
obj:
The argument 'Obj' given to the function OptDim().
cl:
Object of mode "call".

Details

The function 'OptDim' allows for a comparison of the optimal factor dimensions obtained from different panel criteria (in total 13). This criteria are adjusted for panel data with diverging T and N.

References

  • Ahn, S. C., Horenstein, A. R. 2013 “Eigenvalue ratio test for the number of factors”, Econometrica
  • Bai, J., 2009 “Panel data models with interactive fixed effects”, Econometrica
  • Bai, J. 2004 “Estimating cross-section common stochastic trends in nonstationary data”, Journal of Econometrics
  • Bai, J., Ng, S. 2009 “Determining the number of factors in approximated factor models”, Econometrica
  • Kneip, A., Sickles, R. C., Song, W., 2012 “A New Panel Data Treatment for Heterogeneity in Time Trends”, Econometric Theory
  • Onatski, A. 2010 “Determining the number of factors from empirical distribution of eigenvalues”, The Review of Economics and Statistics

Examples

Run this code
## See the example in 'help(Cigar)' in order to take a look at the
## data set 'Cigar'

##########
## DATA ##
##########

data(Cigar)
N <- 46
T <- 30


## Data: Cigarette-Sales per Capita
l.Consumption    <- log(matrix(Cigar$sales, T,N))

## Calculation is based on the covariance matrix of l.Consumption

OptDim(l.Consumption)

## Calculation is based on the correlation matrix of l.Consumption

OptDim(l.Consumption, standardize = TRUE)

## Display the magnitude of the eigenvalues in percentage of the total variance

plot(OptDim(l.Consumption))

Run the code above in your browser using DataLab