View source: R/03_IFE_algorithm_functions.R
initialise_beta | R Documentation |
Note: this needs to be called before the definition of grid.
initialise_beta(
Y,
X,
S,
robust,
method_estimate_beta = "individual",
nosetting_lmrob = FALSE
)
Y |
Y: NxT dataframe with the panel data of interest |
X |
dataframe with the observed variables |
S |
estimated number of groups |
robust |
robust or classical estimation |
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". |
nosetting_lmrob |
option to remove the recommended setting in lmrob(). It is much faster. Defaults to FALSE. |
Matrix with number of rows equal to the number of estimated variables plus one. If method_estimate_beta is set to the default ("individual"), the number of columns is equal to the number of time series in Y. If method_estimate_beta is set to "group" or to "homogeneous" the number of columns is equal to the number of groups.
X <- X_dgp3
Y <- Y_dgp3
# Set estimations for group factors and its loadings, and group membership
# to the true value for this example.
lambda_group <- lambda_group_true_dgp3
factor_group <- factor_group_true_dgp3
beta_init <- initialise_beta(Y, X,
S = 3, TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.