\name{ipwCoxCSV-package}
\alias{ipwCoxCSV-package}
\docType{package}
\title{
Inference for Marginal Hazard Ratios (HRs) in Inverse Probability Weighted (IPW) Cox Models Using Corrected Sandwich Variance (CSV)
}
\description{
This package implements the corrected sandwich variance (CSV)  method for inverse probability weighted (IPW) Cox models described in Shu et al. (2021) <doi:10.1111/biom.13332>. The method accounts for the uncertainty in estimating propensity score weights, thereby improving variance estimation and confidence interval estimation for IPW-adjusted marginal hazard ratios (HRs) in observational and randomized studies. The package supports estimation of the average treatment effect (ATE) using conventional and stabilized ATE weights, and the average treatment effect in the treated (ATT) using ATT weights, for both independent and clustered data. Propensity scores are estimated using logistic regression.
}
\details{
The \code{ipwCoxCSV} package implements the corrected sandwich variance  method  proposed by Shu et al. (2021) <doi:10.1111/biom.13332>, which provides statistically consistent variance estimates for adjusted marginal hazard ratios (HRs) when fitting inverse probability weighted (IPW) Cox models in observational and randomized studies. By accounting for the uncertainty associated with estimating propensity score weights through stacked estimating equations, the method improves the accuracy and efficiency of variance estimation and confidence interval construction. The function \code{\link[ipwCoxCSV]{ipwCoxInd}} implements the corrected sandwich variance estimation method for the standard setting, assuming independence among observations (rows). The function \code{\link[ipwCoxCSV]{ipwCoxCluster}} implements the corrected sandwich variance estimation method for clustered data, such as repeated measurements within individuals (i.e., multiple rows of observations for the same individual). 
}
\author{
Di Shu and Rui Wang

Maintainer: Di Shu <shudi1991@gmail.com>
}
\references{
Shu D, Young JG, Toh S, Wang R (2021). Variance estimation in inverse probability weighted Cox models.  \emph{Biometrics} <doi:10.1111/biom.13332>
}
\keyword{ package }
