initialise_beta {RCTS}R Documentation

Initialisation of estimation of beta (the coefficients with the observable variables)

Description

Note: this needs to be called before the definition of grid.

Usage

initialise_beta(
  Y,
  X,
  S,
  robust,
  method_estimate_beta = "individual",
  nosetting_lmrob = FALSE
)

Arguments

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.

Value

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.

Examples


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
)


[Package RCTS version 0.2.4 Index]