winreg: Double Cox regression for win product

View source: R/winreg.R

winregR Documentation

Double Cox regression for win product

Description

Use two Cox regression models (one for the terminal event and the other for the non-trminal event) to model the win product adjusting for covariates

Usage

winreg(y1,y2,d1,d2,z)

Arguments

y1

a numeric vector of event times denoting the minimum of event times T_1, T_2 and censoring time C, where the endpoint T_2, corresponding to the terminal event, is considered of higher clinical importance than the endpoint T_1, corresponding to the non-terminal event. Note that the terminal event may censor the non-terminal event, resulting in informative censoring.

y2

a numeric vector of event times denoting the minimum of event time T_2 and censoring time C. Clearly, y2 is not smaller than y1.

d1

a numeric vector of event indicators with 1 denoting the non-terminal event is observed and 0 else.

d2

a numeric vector of event indicators with 1 denoting the terminal event is observed and 0 else.

z

a numeric matrix of covariates.

Details

This function uses two Cox regression models (one for the terminal event and the other for the non-trminal event) to model the win product adjusting for covariates.

Value

beta1

Estimated regression parameter based on the non-terminal event times y1, \exp(beta1) is the adjusted hazard ratio

sigma1

Estimated variance of beta1 using the residual method instead of the inverse of Fisher information

tb1

Wald test statistics based on beta1 and sigma1

pb1

Two-sided p-values of the Wald test statistics tb1

beta2

Estimated regression parameter based on the terminal event times y2, \exp(beta2) is the adjusted hazard ratio

sigma2

Estimated variance of beta2 using the residual method instead of the inverse of Fisher information

tb2

Wald test statistics based on beta2 and sigma2

pb2

Two-sided p-values of the Wald test statistics tb2

beta

beta1+beta2,\exp(-beta) is the adjusted win product

sigma

Estimated variance of beta using the residual method

tb

Wald test statistics based on beta and sigma

pb

Two-sided p-values of the Wald test statistics tb

Author(s)

Xiaodong Luo

References

Pocock S.J., Ariti C.A., Collier T. J. and Wang D. 2012. The win ratio: a new approach to the analysis of composite endpoints in clinical trials based on clinical priorities. European Heart Journal, 33, 176-182.

Luo X., Tian H., Mohanty S. and Tsai W.-Y. 2015. An alternative approach to confidence interval estimation for the win ratio statistic. Biometrics, 71, 139-145.

Luo X., Qiu J., Bai S. and Tian H. 2017. Weighted win loss approach for analyzing prioritized outcomes. Statistics in Medicine, to appear.

See Also

wrlogistic

Examples

###Generate data
n<-300
rho<-0.5
b2<-c(1.0,-1.0)
b1<-c(0.5,-0.9)
bc<-c(1.0,0.5)
lambda10<-0.1;lambda20<-0.08;lambdac0<-0.09
lam1<-rep(0,n);lam2<-rep(0,n);lamc<-rep(0,n)
z1<-rep(0,n)
z1[1:(n/2)]<-1
z2<-rnorm(n)
z<-cbind(z1,z2)

lam1<-lam2<-lamc<-rep(0,n)
for (i in 1:n){
    lam1[i]<-lambda10*exp(-sum(z[i,]*b1))
    lam2[i]<-lambda20*exp(-sum(z[i,]*b2))
    lamc[i]<-lambdac0*exp(-sum(z[i,]*bc))
}
tem<-matrix(0,ncol=3,nrow=n)

y2y<-matrix(0,nrow=n,ncol=3)
y2y[,1]<-rnorm(n);y2y[,3]<-rnorm(n)
y2y[,2]<-rho*y2y[,1]+sqrt(1-rho^2)*y2y[,3]
tem[,1]<--log(1-pnorm(y2y[,1]))/lam1
tem[,2]<--log(1-pnorm(y2y[,2]))/lam2
tem[,3]<--log(1-runif(n))/lamc

y1<-apply(tem,1,min)
y2<-apply(tem[,2:3],1,min)
d1<-as.numeric(tem[,1]<=y1)
d2<-as.numeric(tem[,2]<=y2)

y<-cbind(y1,y2,d1,d2)
z<-as.matrix(z)
aa<-winreg(y1,y2,d1,d2,z)
aa

WLreg documentation built on Aug. 9, 2023, 9:08 a.m.

Related to winreg in WLreg...