add_pic_parallel {RCTS} | R Documentation |
Calculates the PIC for the current configuration.
Description
Calculates the PIC for the current configuration.
Usage
add_pic_parallel(
Y,
beta_est,
g,
S,
k,
kg,
robust,
est_errors,
C_candidates,
choice_pic,
method_estimate_beta = "individual"
)
Arguments
Y |
Y: NxT dataframe with the panel data of interest |
beta_est |
estimated values of beta |
g |
Vector with estimated group membership for all individuals |
S |
number of estimated groups |
k |
estimated number of common factors |
kg |
vector with the estimated number of group specific factors for each group |
robust |
robust or classical estimation |
est_errors |
NxT matrix with the error terms |
C_candidates |
candidates for C (parameter in PIC) |
choice_pic |
parameter that defines which PIC is used to select the best configuration of groups and factors. Options are "pic2017" (uses the PIC of Ando and Bai (2017)), "pic2016" (Ando and Bai (2016)) weighs the fourth term with an extra factor relative to the size of the groups, and "pic2022". They differ in the penalty they perform on the number of group specific factors (and implicitly on the number of groups). They also differ in the sense that they have different NT-regions (where N is the number of time series and T is the length of the time series) where the estimated number of groups, and thus group specific factors will be wrong. Pic2022 is designed to shrink the problematic NT-region to very large N / very small T). |
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". |
Value
numeric vector with a value for each candidate C