library(YPPE)
data(gastric)
ph <- phpe(Surv(time, status)~trt, data = gastric, n_int = 10, init = 0)
po <- pope(Surv(time, status)~trt, data = gastric, n_int = 10, init = 0)
yp <- yppe(Surv(time, status)~trt, data = gastric, n_int = 10, init = 0)
anova(ph, po, yp)
#>
#> Model 1 ( ph ): Surv(time, status) ~ trt
#> Model 2 ( po ): Surv(time, status) ~ trt
#> Model 3 ( yp ): Surv(time, status) ~ trt
#> ---
#> loglik LR df Pr(>Chi)
#> Model 1: -588.4035 11.7338 1 0.0006138 ***
#> Model 2: -586.5475 8.0219 1 0.0046214 **
#> Model 3: -582.5366 - - -
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
AIC(ph, po, yp)
#> yp po ph
#> 1189.073 1195.095 1198.807