Cross-validated bandwidth for the OR model
Usage
locpol_or_bw(
dp,
dty,
dt_index,
n_start,
bw_init = NULL,
bw_seed = NULL,
bw_upper_cont = "adaptive",
cv_type = "loocv",
or_order = 1,
rcv_train_frac = 0.5
)Arguments
- dp
Data list (see
dgps_did).- dty
Product of treatment/time indicators and outcomes.
- dt_index
Treatment/time group index.
- n_start
Number of random restarts (data-adaptive starts are generated).
- bw_init
Optional initial bandwidth(s) for optimization restarts. Supply a length-3 vector or a 3 x n_start matrix. If provided, this overrides internally generated starts and sets n_start to ncol(bw_init).
- bw_seed
Optional integer seed for reproducible random starts.
- bw_upper_cont
Upper bound for continuous bandwidth search. Use numeric value or
"adaptive"(default).- cv_type
Cross-validation type ("loocv" or "rcv").
- or_order
Local polynomial order for the OR fit (
qin the paper).- rcv_train_frac
Training fraction used by RCV sample splitting. Ignored when
cv_type = "loocv". Defaults to0.5.