# NOT RUN {
# 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
# }
Run the code above in your browser using DataCamp Workspace