calculate_Z_common {RCTS}R Documentation

Calculates Z = Y - X*beta_est - LgFg. It is used in the estimate of the common factorstructure.

Description

Calculates Z = Y - X*beta_est - LgFg. It is used in the estimate of the common factorstructure.

Usage

calculate_Z_common(
  Y,
  X,
  beta_est,
  g,
  lgfg_list,
  vars_est,
  kg,
  method_estimate_beta,
  method_estimate_factors,
  initialise = FALSE
)

Arguments

Y

Y: NxT dataframe with the panel data of interest

X

X: NxTxp array containing the observable variables

beta_est

estimated values of beta

g

Vector with group membership for all individuals

lgfg_list

This is a list (length number of groups) containing FgLg for every group.

vars_est

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.

kg

number of group specific factors to be estimated

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".

method_estimate_factors

defines method of robust estimaton of the factors: "macro", "pertmm" or "cz"

initialise

indicator of being in the initialisation phase

Value

NxT matrix


[Package RCTS version 0.2.4 Index]