calculate_lambda {RCTS} | R Documentation |
calculates factor loadings of common factors
Description
calculates factor loadings of common factors
Usage
calculate_lambda(
Y,
X,
beta_est,
comfactor,
factor_group,
g,
lgfg_list,
k,
kg,
robust,
method_estimate_beta,
method_estimate_factors,
verbose = FALSE,
initialise = 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 |
comfactor |
common factors |
factor_group |
estimated group specific factors |
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" |
verbose |
when TRUE, it prints messages |
initialise |
indicator of being in the initialisation phase |
Value
Returns a matrix where each row contains a common factor. If the number of estimated common factors equals zero, it returns a matrix with 1 row, containing zero's.