cor2x2 {factorial2x2} | R Documentation |
Hazard ratios and correlations for the 2x2 statistics
Description
Computes the hazard ratios, confidence intervals, p-values, and correlations for the overall A, simple A, and simple AB logrank statistics.
Usage
cor2x2(time, event, indA, indB, covmat)
Arguments
time |
follow-up times |
event |
event indicators (0/1) |
indA |
treatment A indicators (0/1) |
indB |
treatment B indicators (0/1) |
covmat |
matrix of covariates; one row per subject. NOTE!! Factor variables must use 0/1 indicator variables |
Details
This function computes (i) correlation between the overall A test and the simple A test (ii) correlation between the overall A test and the simple AB test (iii) correaltion between the simple A and simple AB test. The correlation estimates are derived in Lin, Gong, Gallo, et al. (Biometrics 2016).
Value
loghrA |
overall A log hazard ratio |
seA |
standard error of the overall A log hazard ratio |
hrA |
overall A hazard ratio |
ciA |
95% confidence interval for overall A hazard ratio |
pvalA |
two-sided p-value for overall A hazard ratio |
loghra |
simple A log hazard ratio |
sea |
standard error of the simple A log hazard ratio |
hra |
simple A hazard ratio |
cia |
95% confidence interval for simple A hazard ratio |
pvala |
two-sided p-value for simple A hazard ratio |
loghrab |
simple AB log hazard ratio |
seab |
standard error of the simple AB log hazard ratio |
hrab |
simple AB hazard ratio |
ciab |
95% confidence interval for simple AB hazard ratio |
pvalab |
two-sided p-value for simple AB hazard ratio |
corAa |
correlation between the overall A and simple A test statistics |
corAab |
correlation between the overall A and simple AB test statistics |
coraab |
correlation between the simple A and simple AB test statistics |
References
Lin, D.Y., Glong , J., Gallo, P., Bunn, P.H., Couper, D. Simultaneous inference on treatment effects in survival studies with factorial designs. Biometrics, 2016; 72: 1078-1085.
Examples
# First load the simulated data variables. The "simdat" file is
# a 100-by-9 matrix which is loaded with the factorial2x2 package.
time <- simdat[, "time"]
event <- simdat[, "event"]
indA <- simdat[, "indA"]
indB <- simdat[, "indB"]
covmat <- simdat[, 6:10]
cor2x2(time, event, indA, indB, covmat)
# $loghrA
# [1] 0.05613844
# $seA
# [1] 0.4531521
# $hrA
# [1] 1.057744
# $ciA
# [1] 0.4351608 2.5710556
# $pvalA
# [1] 0.9014069
# $loghra
# [1] 0.1987329
# $sea
# [1] 0.6805458
# $hra
# [1] 1.219856
# $cia
# [1] 0.3213781 4.6302116
# $pvala
# [1] 0.7702714
# $loghrab
# [1] 0.2864932
# $seab
# [1] 0.6762458
# $hrab
# [1] 1.331749
# $ciab
# [1] 0.3538265 5.0125010
# $pvalab
# [1] 0.6718193
# $corAa
# [1] 0.6123399
# $corAab
# [1] 0.5675396
# $coraab
# [1] 0.4642737