cgpsmatch | R Documentation |
This function computes generalized propensity score for exposed and unexposed units using the product of the propensity score and the conditional generalized propensity score and/or conducts matching by this generalized propensity score.
cgpsmatch( data, bexp, cexp, ps, model.exponly, expstatus = 1, method = NULL, caliper_bw = 0.1, replace = TRUE, weight.cutoff = 10 )
data |
a dataset object. |
bexp |
a character string indicating the name of the binary exposure variable. Use apostrophe like "VariableName" |
cexp |
a character string indicating the name of the continuous exposure variable. Use apostrophe like "VariableName" |
ps |
a character string indicating the name of propensity score. |
model.exponly |
a regression model object that is a generalized propensity score regression model fitted using only exposed units. |
method |
a character string indicating the matching method used to conduct matching. Default is NULL. If NULL, only generalized propensity score is computed and matching is not done. Options include "nearest" (nearest neighbor matching) and "caliper" (caliper matching) |
caliper_bw |
a numeric vector indicating caliper bandwidth. Default is 0.1. If method is "nearest", this parameter is ignored. |
replace |
an indicator of whether matching is done with replacement. Default is TRUE. If FALSE, matching is done without replacement. If FALSE, note that the output of this function may differ by the order of observation units in the original dataset. |
weight.cutoff |
a numeric vector indicating the cutoff value of the weight. Default is 10. |
exp.status |
the value indicating exposed units. Default is 1 |
cgpsmatch()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.