cor2x2: Hazard ratios and correlations for the 2x2 statistics

Description Usage Arguments Details Value References Examples

View source: R/cor2x2.R

Description

Computes the hazard ratios, confidence intervals, p-values, and correlations for the overall A, simple A, and simple AB logrank statistics.

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# 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

factorial2x2 documentation built on April 28, 2020, 1:09 a.m.