winreg {WLreg} | R 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 |
y2 |
a numeric vector of event times denoting the minimum of event time |
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 |
sigma1 |
Estimated variance of |
tb1 |
Wald test statistics based on |
pb1 |
Two-sided p-values of the Wald test statistics |
beta2 |
Estimated regression parameter based on the terminal event times |
sigma2 |
Estimated variance of |
tb2 |
Wald test statistics based on |
pb2 |
Two-sided p-values of the Wald test statistics |
beta |
|
sigma |
Estimated variance of |
tb |
Wald test statistics based on |
pb |
Two-sided p-values of the Wald test statistics |
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
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