PSmethod_sga: Fitting propensity scores with different models

View source: R/PSmethod_sga.R

PSmethod_sgaR Documentation

Fitting propensity scores with different models

Description

The function PSmethod_sga is an internal function to estimate the propensity scores given a specified model through formula. It is built into function Sumstat_sga, and PSweight_sga.

Usage

PSmethod_sga(
  ps.formula = ps.formula,
  method = "glm",
  weight = "overlap",
  data = data
)

Arguments

ps.formula

an object of class formula (or one that can be coerced to that class): a symbolic description of the propensity score model to be fitted. Additional details of model specification are given under "Details". This argument is optional if ps.estimate is not NULL.

method

a character to specify the method for propensity model. When ps.formula is given, "glm" is the default; When xname is given, "LASSO" is the default.

weight

a character or vector of characters including the types of weights to be used. "IPW" specifies the inverse probability weights for estimating the average treatment effect among the combined population (ATE). "treated" specifies the weights for estimating the average treatment effect among the treated (ATT). "overlap" specifies the (generalized) overlap weights for estimating the average treatment effect among the overlap population (ATO), or population at clinical equipoise. "matching" specifies the matching weights for estimating the average treatment effect among the matched population (ATM). "entropy" specifies the entropy weights for the average treatment effect of entropy weighted population (ATEN). Default is "overlap".

data

a data frame containing the variables in the propensity score model.

Details

A typical form for ps.formula is treatment ~ terms where treatment is the treatment variable (identical to the variable name used to specify zname) and terms is a series of terms which specifies a linear predictor for treatment. ps.formula by default specifies generalized linear models given the default argument method = "glm". It fits the logistic regression. The argument method allows user to choose model other than glm to fit the propensity score models. In Yang et al.(2021), the term is suggested to include all main effects and pairwise subgroup-confounder interactions, combined with the method="LASSO" to select important interactions. We have included "LASSO" and "gbm", through the method argument. Note that the current code does not handle multiple treatment groups.

Value

e.h

a data frame of estimated propensity scores.

nonzero_coef

the LASSO selected interactions when method = "LASSO".

References

Yang, S., Lorenzi, E., Papadogeorgou, G., Wojdyla, D. M., Li, F., & Thomas, L. E. (2021). Propensity score weighting for causal subgroup analysis. Statistics in medicine, 40(19), 4294-4309.


siyunyang/PSweight.sga documentation built on Aug. 16, 2022, 5:23 a.m.