View source: R/03_IFE_algorithm_functions.R
calculate_virtual_factor_and_lambda_group | R Documentation |
This function calculates FgLg (the groupfactorstructure) for all possible groups where individual i can be placed. For each group were the groupfactors (Fg) estimated earlier. Now the grouploadings are needed for each group as well. In the classical case these are calculated by Fg*Y/T. In the robust case these are robust.
calculate_virtual_factor_and_lambda_group(
group,
solve_FG_FG_times_FG,
robust,
NN_local,
method_estimate_factors_local,
g,
vars_est,
number_of_group_factors_local,
number_of_common_factors_local,
method_estimate_beta,
factor_group,
lambda,
comfactor,
Y,
X,
beta_est,
verbose = FALSE
)
group |
number of groups |
solve_FG_FG_times_FG |
This is the same as groupfactor / T. It is only used in the Classical approach |
robust |
robust or classical estimation of group membership |
NN_local |
number of time series |
method_estimate_factors_local |
specifies the robust algorithm to estimate factors: default is "macro" |
g |
vector with estimated group membership for all individuals |
vars_est |
number of variables that are included in the algorithm and have their coefficient estimated. This is usually equal to vars. |
number_of_group_factors_local |
number of group factors to be estimated |
number_of_common_factors_local |
number of common factors to be estimated |
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". |
factor_group |
estimated group specific factors |
lambda |
loadings of the estimated common factors |
comfactor |
estimated common factors |
Y |
Y: NxT dataframe with the panel data of interest |
X |
X: NxTxp array containing the observable variables |
beta_est |
estimated values of beta |
verbose |
when TRUE, it prints messages |
NxT matrix containing the product of virtual groupfactors and virtual loadings
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.