Learn R Programming

mets (version 1.3.11)

binreg_IPTW: IPTW logistic regression, Inverse Probabibilty of Treatment Weighted binreg

Description

Fits logistic regression model with treatment weights $$ w(A)= \sum_a I(A=a)/P(A=a|X) $$, computes standard errors via influence functions that are returned as the IID argument. Propensity scores are fitted using either logistic regression (glm) or the multinomial model (mlogit) when more than two categories for treatment. The treatment needs to be a factor and is identified on the rhs of the "treat.model". Can handle right censored binreg type estimating equations with IPTW weights.

Usage

binreg_IPTW(
  formula,
  data,
  treat.model = NULL,
  weights = NULL,
  estpr = 1,
  pi0 = 0.5,
  ...
)

Arguments

formula

for binreg

data

data-frame for estimation

treat.model

propensity score model (binary or multinomial)

weights

may be given, and then uses weights*w(A) as the weights

estpr

to estimate propensity scores and get infuence function contribution to uncertainty

pi0

fixed simple weights

...

arguments for binreg call

Author

Thomas Scheike

Details

Also works with cluster argument.

Examples

Run this code

data(bmt)
dfactor(bmt) <- platelet.f~platelet
## logistic modelling of cumulative incidence 
gg <- binreg_IPTW(Event(time,cause)~platelet.f+age,bmt,
	       treat.model=platelet.f~age,time=30)
summary(gg)
head(iid(gg))

## logistic modelling  
gg <- binreg_IPTW(tcell~platelet.f+age,bmt,
	       treat.model=platelet.f~age)
summary(gg)

Run the code above in your browser using DataLab