Package: drape 0.0.2

Harvey Klyne

drape: Doubly Robust Average Partial Effects

Doubly robust average partial effect estimation. This implementation contains methods for adding additional smoothness to plug-in regression procedures and for estimating score functions using smoothing splines. Details of the method can be found in Harvey Klyne and Rajen D. Shah (2023) <doi:10.48550/arXiv.2308.09207>.

Authors:Harvey Klyne [aut, cre, cph]

drape_0.0.2.tar.gz
drape_0.0.2.tar.gz(r-4.5-noble)drape_0.0.2.tar.gz(r-4.4-noble)
drape_0.0.2.tgz(r-4.4-emscripten)drape_0.0.2.tgz(r-4.3-emscripten)
drape.pdf |drape.html
drape/json (API)
NEWS

# Install 'drape' in R:
install.packages('drape', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/harveyklyne/drape/issues

2.70 score 4 scripts 172 downloads 8 exports 0 dependencies

Last updated 16 days agofrom:11edd71723. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 29 2024
R-4.5-linuxOKNov 29 2024

Exports:basis_polycv_resmoothcv_spline_scoredrapeng_pseudo_responseresmoothsimulate_dataspline_score

Dependencies:

drape

Rendered fromdrape.Rmdusingknitr::rmarkdownon Nov 29 2024.

Last update: 2023-09-18
Started: 2023-09-18

Readme and manuals

Help Manual

Help pageTopics
Estimate the score function of the d'th covariate using a polynomial basis.basis_poly
Generate simulation data and evaluate estimators, with sample splitting.compare
Evaluate estimators by training nuisance functions on training set and evaluating them on test set.compare_evaluate
Generate simulation data and evaluate OLS estimator.compare_lm
Generate simulation data and evaluate partially linear estimator.compare_partially_linear
Generate simulation data and evaluate Rothenhausler estimator.compare_rothenhausler
K-fold cross-validation for resmoothing bandwidth.cv_resmooth
K-fold cross-validation for spline_score.cv_spline_score
Estimate the doubly-robust average partial effect estimate of X on Y, in the presence of Z.drape
Fit a lasso regression using quadratic polynomial basis, with interactions.fit_lasso_poly
Fit pre-tuned XGBoost regression for use in simulations.fit_xgboost
Compute sums of a Monte Carlo vector for use in resmoothing.MC_sums
Population score function for the symmetric mixture two Gaussian random variables.mixture_score
Generate a matrix of covariates for use in resmoothing, in which the d'th column of X is translated successively by the Kronecker product of bw and MC_variates.new_X
Generate pseudo responses as in Ng 1994 to enable univariate score estimation by standard smoothing spline regression.ng_pseudo_response
Fit a doubly-robust partially linear regression using the DoubleML package and pre-tuned XGBoost regressions, for use in simulations.partially_linear
Resmooth the predictions of a fitted modelresmooth
Symmetric mixture two Gaussian random variables.rmixture
Generate the modified quadratic basis of Rothenhausler and Yu.rothenhausler_basis
Estimate the average partial effect of using the debiased lasso method of Rothenhausler and Yu, using pre-tuned lasso penalties, for use in simulations.rothenhausler_yu
Generate simulation data.simulate_data
Sort and bin x within a specified tolerance, using hist().sort_bin
Univariate score estimation via the smoothing spline method of Cox 1985 and Ng 1994.spline_score
Generate n copies of Z ~ N_{p}(0,Sigma), where Sigma_{jj} = 1, Sigma_{jk} = \text{corr} for all j not equal to k.z_correlated_normal