Helpfunction in OF_vectorized3()
OF_vectorized_helpfunction3(
i,
t,
XBETA,
LF,
group_memberships,
lgfg_list,
Y,
kg
)numeric: contains the contribution to the objective function of one timepoint for one time series
index of individual
index of time
matrixproduct of X and beta_est
matrixproduct of common factors and its loadings
Vector with group membership for all individuals
product of groupfactors and their loadings; list with length the number of groups
Y: NxT dataframe with the panel data of interest
vector containing the number of group factors to be estimated for all groups