ablasso_mv_ss {ablasso} | R Documentation |
AB-LASSO Estimator with Random Sample Splitting for Multivariate Models
Description
Implements the AB-LASSO estimation method for the multivariate model
Y_{it} = \alpha_{i} + \gamma_{t} + \sum_{j=1}^{L} \beta_{j} Y_{i,t-j} + \theta_{0} D_{it} + \theta_{1} C_{i,t-1} + \varepsilon_{it}
, with random sample splitting. Note that D_{it}
and C_{it}
are predetermined with respect to \varepsilon_{it}
.
Usage
ablasso_mv_ss(Y, D, C, lag = 1, Kf = 2, nboot = 100, seed = 202302)
Arguments
Y |
A |
D |
A |
C |
A list of |
lag |
The lag order of |
Kf |
The number of folds for K-fold cross-validation, with options being |
nboot |
The number of random sample splits, default is |
seed |
Seed for random number generation, default |
Value
A dataframe that includes the estimated coefficients (\beta_{j}, \theta_{0}, \theta_{1}
), their standard errors, and T-statistics.
Examples
# Use the Covid data
N = length(unique(covid_data$fips))
P = length(unique(covid_data$week))
Y = matrix(covid_data$logdc, nrow = P, ncol = N)
D = matrix(covid_data$dlogtests, nrow = P, ncol = N)
C = list()
C[[1]] = matrix(covid_data$school, nrow = P, ncol = N)
C[[2]] = matrix(covid_data$college, nrow = P, ncol = N)
C[[3]] = matrix(covid_data$pmask, nrow = P, ncol = N)
C[[4]] = matrix(covid_data$pshelter, nrow = P, ncol = N)
C[[5]] = matrix(covid_data$pgather50, nrow = P, ncol = N)
results.kf2 <- ablasso_mv_ss(Y = Y, D = D, C = C, lag = 4, nboot = 2)
print(results.kf2)
results.kf5 <- ablasso_mv_ss(Y = Y, D = D, C = C, lag = 4, Kf = 5, nboot = 2)
print(results.kf5)