% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/restricted.mean.R
\name{resmeanATE}
\alias{resmeanATE}
\alias{rmstATE}
\title{Average Treatment Effect for Restricted Mean Time}
\usage{
resmeanATE(formula, data, model = "exp", outcome = c("rmst", "rmtl"), ...)
}
\arguments{
\item{formula}{Formula with an \code{Event} outcome. The first covariate must be the treatment factor.}

\item{data}{Data frame.}

\item{model}{Link function: \code{"exp"} (exponential) or \code{"lin"} (identity).}

\item{outcome}{Outcome type: \code{"rmst"} or \code{"rmtl"}.}

\item{...}{Additional arguments passed to \code{binregATE}, such as \code{time}, \code{treat.model}, 
\code{augmentR0}, \code{augmentC}, etc.}
}
\value{
An object of class \code{"binregATE"} containing:
  \item{riskG}{Simple IPCW estimator results.}
  \item{riskDR}{Double Robust estimator results.}
  \item{riskG.iid, riskDR.iid}{Influence functions.}
  \item{coef}{Treatment effect estimates.}
  \item{se}{Standard errors.}
}
\description{
Estimates the Average Treatment Effect (ATE) for Restricted Mean Survival Time (RMST) 
or Restricted Mean Time Lost (RMTL) in censored competing risks data using IPCW.
}
\details{
Under standard causal assumptions (Consistency, Ignorability, Positivity), the ATE is 
estimated as \eqn{E(Y(1) - Y(0))}, where \eqn{Y(a)} is the potential outcome under treatment \eqn{a}.
The method uses double robust estimating equations that are IPCW-adjusted for censoring.

The first covariate in the formula must be the treatment effect (a factor). If the factor 
has more than two levels, multinomial logistic regression (mlogit) is used for propensity 
score modeling.
}
\examples{
data(bmt); bmt$event <- bmt$cause!=0; dfactor(bmt) <- tcell~tcell

out <- resmeanATE(Event(time,event)~tcell+platelet, data=bmt, time=40, 
                  treat.model=tcell~platelet, outcome="rmtl")
summary(out)

out1 <- resmeanATE(Event(time,cause)~tcell+platelet, data=bmt, cause=1, time=40,
                   treat.model=tcell~platelet, outcome="rmtl")
summary(out1)

}
\references{
Scheike, T. and Holst, K. K. (2024). Restricted mean time lost for survival and competing risks data using mets in R. WIP.

Scheike, T. and Tanaka, S. (2025). Restricted mean time lost ratio regression: Percentage of restricted mean time lost due to specific cause. WIP.
}
\seealso{
\code{\link{binregATE}}, \code{\link{ratioATE}}
}
\author{
Thomas Scheike
}
