knitr::opts_chunk$set( comment = "#>", collapse = TRUE, out.width = "70%", fig.align = "center", fig.width = 6, fig.asp = .618, fig.pos = "H" ) options(digits = 3)
This is an R package to help the SKKU modern statistical methods project. It is basically based on the paper
# install.packages("remotes") remotes::install_github("ygeunkim/propensityml")
propensityml
package aims at estimating propensity score with machine learning methods as in the paper mentioned above.
library(propensityml)
The package provides simulation function that generates the dataset in the paper:
and additional toy datasets. Consider simulation.
The most simplest scenario, i.e. additivity and linearity model:
(x <- sim_outcome(1000, covmat = build_covariate()))
(fit_rf <- x %>% ps_rf(exposure ~ . - y - exposure_prob, data = .))
We have defined the class named propmod
for some usage.
class(fit_rf)
Estimating propensity score:
estimate_ps(fit_rf) %>% head()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.