% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/glm-utils.R
\name{binreg_IPTW}
\alias{binreg_IPTW}
\title{IPTW logistic regression, Inverse Probabibilty of Treatment Weighted binreg}
\usage{
binreg_IPTW(
  formula,
  data,
  treat.model = NULL,
  weights = NULL,
  estpr = 1,
  pi0 = 0.5,
  ...
)
}
\arguments{
\item{formula}{for binreg}

\item{data}{data-frame for estimation}

\item{treat.model}{propensity score model (binary or multinomial)}

\item{weights}{may be given, and then uses weights*w(A) as the weights}

\item{estpr}{to estimate propensity scores and get infuence function contribution to uncertainty}

\item{pi0}{fixed simple weights}

\item{...}{arguments for  binreg call}
}
\description{
Fits logistic regression model with treatment weights \deqn{ 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.
}
\details{
Also works with cluster argument.
}
\examples{

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)
}
\author{
Thomas Scheike
}
