estimate_gps {GPCERF}R Documentation

Estimate a model for generalized propensity score

Description

Estimates a model for generalized propensity score (GPS) using parametric approach.

Usage

estimate_gps(cov_mt, w_all, sl_lib, dnorm_log)

Arguments

cov_mt

A covariate matrix containing all covariates. Each row is a data sample and each column is a covariate.

w_all

A vector of observed exposure levels.

sl_lib

A vector of SuperLearner's package libraries.

dnorm_log

Logical, if TRUE, probabilities p are given as log(p).

Value

A data.frame that includes:

Examples


data <- generate_synthetic_data(sample_size = 200)
gps_m <- estimate_gps(cov_mt = data[,-(1:2)],
                      w_all = data$treat,
                      sl_lib = c("SL.xgboost"),
                      dnorm_log = FALSE)


[Package GPCERF version 0.2.4 Index]