View source: R/03_IFE_algorithm_functions.R
calculate_errors_virtual_groups | R Documentation |
During the updating of group membership, the errorterm is used as the objective function to estimate the group.
calculate_errors_virtual_groups(
group,
LF,
virtual_grouped_factor_structure,
NN,
TT,
k,
kg,
vars_est,
method_estimate_beta,
Y,
X,
beta_est,
g
)
group |
group |
LF |
NxT-matrix of the common factorstructure |
virtual_grouped_factor_structure |
list with length the number of groups; every element of the list contains NxT-matrix |
NN |
number of time series |
TT |
length of time series |
k |
number of common factors to be estimated |
kg |
number of group specific factors to be estimated |
vars_est |
number of variables that will be included in the algorithm and have their coefficient estimated. This is usually equal to the number of observable variables. |
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". |
Y |
Y: NxT dataframe with the panel data of interest |
X |
dataframe with the observed variables |
beta_est |
estimated values of beta |
g |
Vector with estimated group membership for all individuals |
NxT matrix with the errorterms (=Y minus the estimated factorstructure(s) and minus X*beta)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.