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).
estimate_factor(
Y,
X,
beta_est,
g,
lgfg_list,
k,
kg,
robust,
method_estimate_beta,
method_estimate_factors,
initialise = FALSE,
verbose = FALSE
)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.
Y: NxT dataframe with the panel data of interest
X: NxTxp array containing the observable variables
estimated values of beta
Vector with group membership for all individuals
This is a list (length number of groups) containing FgLg for every group.
number of common factors to be estimated
number of group specific factors to be estimated
TRUE or FALSE: defines using the classical or robust algorithm to 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".
defines method of robust estimaton of the factors: "macro", "pertmm" or "cz"
indicator of being in the initialisation phase
when TRUE, it prints messages