## A simple example for Wald-type inference, using simulated data.
## It illustrates the possible inconsistency of Wald-type inference, in
## terms of statistical significance, when inference is based on the risk
## ratio and on the risk difference. This inconsistency cannot exist
## using an empirical likelihood approach.
ResSimA100 <- TwoSampleAalenJohansen(time=SimA100$time,
cause=SimA100$status,
group=SimA100$group,
t=1,
contr=list(method="Wald"))
print(ResSimA100, digits=3, what="Diff")
print(ResSimA100, digits=3, what="RR")
if (FALSE) {
## Same example data, but now analyzed with and empirical likelihood approach. It
## takes approx 20 seconds to run.
ResSimA100 <- TwoSampleAalenJohansen(time=SimA100$time,
cause=SimA100$status,
group=SimA100$group,
t=1)
print(ResSimA100, digits=3, what="Diff", method="EL")
}
Run the code above in your browser using DataLab