Package: drape 0.0.1

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) <arxiv:2308.09207>.

Authors:Harvey Klyne [aut, cre, cph]

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

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

Peer review:

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

On CRAN:

3.70 score 1 stars 4 scripts 148 downloads 8 exports 0 dependencies

Last updated 1 years agofrom:fd8723a9dd. Checks:OK: 3 NOTE: 4. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 13 2024
R-4.5-winNOTEOct 13 2024
R-4.5-linuxNOTEOct 13 2024
R-4.4-winNOTEOct 13 2024
R-4.4-macNOTEOct 13 2024
R-4.3-winOKOct 13 2024
R-4.3-macOKOct 13 2024

Exports:basis_polycv_resmoothcv_spline_scoredrapeng_pseudo_responseresmoothsimulate_dataspline_score

Dependencies:

drape

Rendered fromdrape.Rmdusingknitr::rmarkdownon Oct 13 2024.

Last update: 2023-08-19
Started: 2023-08-19

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 = corr for all j not equal to k.z_correlated_normal