generate_grouped_factorstructure {RCTS} | R Documentation |
Generates the true groupfactorstructure, to use in simulations.
Description
Loadings and factors are generated by: factors ~ N(j * fgr_factor_mean, fgr_factor_sd) -> default case will be N(j, 1) loadings ~ N(lgr_factor_mean, j * lgr_factor_sd) -> default case will be N(0, j)
Usage
generate_grouped_factorstructure(
S,
kg_true,
TT,
g_true,
lgr_factor_mean = 0,
lgr_factor_sd = 1,
fgr_factor_mean = 1,
fgr_factor_sd = 1
)
Arguments
S |
true number of groups |
kg_true |
vector with as length the number of groups, where each element is the true number of groupfactors of that group. |
TT |
length of time series |
g_true |
vector of length NN with true group memberships |
lgr_factor_mean |
mean of the normal distribution from which the loadings are generated |
lgr_factor_sd |
sd of the normal distribution from which the loadings are generated (multiplied by a coefficient for each different group) |
fgr_factor_mean |
mean of the normal distribution from which the group specific factors are generated (multiplied by a coefficient for each different group) |
fgr_factor_sd |
sd of the normal distribution from which the group specific factors are generated |
Value
list: first element contains the true group specific factors and the second element contains the corresponding loadings