ablasso_uv_ss {ablasso} | R Documentation |
AB-LASSO Estimator with Random Sample Splitting
Description
Implements the AB-LASSO estimation method for the univariate model Y_{it} = \alpha_{i} + \gamma_{t} + \theta_{1} Y_{i,t-1} + \theta_{2} D_{it} + \varepsilon_{it}
, incorporating random sample splitting. Note that D_{it}
is predetermined with respect to \varepsilon_{it}
.
Usage
ablasso_uv_ss(Y, D, nboot = 100, Kf = 2, seed = 202304)
Arguments
Y |
A |
D |
A |
nboot |
The number of random sample splits, default is |
Kf |
The number of folds for K-fold cross-validation, with options being |
seed |
Seed for random number generation, default |
Value
A list with three elements:
theta.hat: Estimated coefficients.
std.hat: Estimated Standard errors.
stat: T-Statistics.
Examples
# Generate data
data1 <- generate_data(N = 300, P = 40)
# You can use your own data by providing matrices `Y` and `D`
results.ss <- ablasso_uv_ss(Y = data1$Y, D = data1$D, nboot = 2)
print(results.ss)
results.ss2 <- ablasso_uv_ss(Y = data1$Y, D = data1$D, nboot = 2, Kf = 5)
print(results.ss2)