estimate_factor {RCTS}R Documentation

Estimates common factor(s) F.

Description

The estimator for F, see Anderson (1984), is equal to the first k eigenvectors (multiplied by sqrt(T) due to the restriction F'F/T = I) associated with first r largest eigenvalues of the matrix WW' (which is of size TxT).

Usage

estimate_factor(
  Y,
  X,
  beta_est,
  g,
  lgfg_list,
  k,
  kg,
  robust,
  method_estimate_beta,
  method_estimate_factors,
  initialise = FALSE,
  verbose = FALSE
)

Arguments

Y

Y: NxT dataframe with the panel data of interest

X

X: NxTxp array containing the observable variables

beta_est

estimated values of beta

g

Vector with group membership for all individuals

lgfg_list

This is a list (length number of groups) containing FgLg for every group.

k

number of common factors to be estimated

kg

number of group specific factors to be estimated

robust

TRUE or FALSE: defines using the classical or robust algorithm to estimate beta

method_estimate_beta

defines how beta is estimated. Default case is an estimated beta for each individual. Default value is "individual." Possible values are "homogeneous", "group" or "individual".

method_estimate_factors

defines method of robust estimaton of the factors: "macro", "pertmm" or "cz"

initialise

indicator of being in the initialisation phase

verbose

when TRUE, it prints messages

Value

Return a list. The first element contains the k x T matrix with the k estimated common factors. The second element contains either the robust MacroPCA-based loadings or NA.


[Package RCTS version 0.2.4 Index]