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
)NxT matrix with the errorterms (=Y minus the estimated factorstructure(s) and minus X*beta)
group
NxT-matrix of the common factorstructure
list with length the number of groups; every element of the list contains NxT-matrix
number of time series
length of time series
number of common factors to be estimated
number of group specific factors to be estimated
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.
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: NxT dataframe with the panel data of interest
dataframe with the observed variables
estimated values of beta
Vector with estimated group membership for all individuals