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 P x N (number of time periods x number of individuals) matrix containing the outcome/response variable variable Y.

D

A P x N (number of time periods x number of individuals) matrix containing the policy variable/treatment D.

nboot

The number of random sample splits, default is 100.

Kf

The number of folds for K-fold cross-validation, with options being 2 or 5, default is 2.

seed

Seed for random number generation, default 202304.

Value

A list with three elements:

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)


[Package ablasso version 1.0 Index]