Skip to contents
library(YPPE)
#> Loading required package: survival

mle <- yppe(Surv(time, status)~trt, data=gastric, n_int = 10, approach = "mle", init = 0)
summary(mle)
#> Call:
#> yppe(formula = Surv(time, status) ~ trt, data = gastric, n_int = 10, 
#>     approach = "mle", init = 0)
#> 
#> Short-term coefficients:
#>     Estimate  StdErr z.value  p.value   
#> trt  1.77113 0.61843  2.8639 0.004185 **
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> Long-term coefficients:
#>     Estimate   StdErr z.value   p.value    
#> trt -0.98230  0.29576 -3.3212 0.0008962 ***
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> --- 
#> loglik = -582.5366   AIC = 1189.073
coef(mle)
#>     psi[1]     phi[1] 
#>  1.7711332 -0.9823035
vcov(mle)
#>            psi[1]      phi[1]
#> psi[1]  0.3824616 -0.10323293
#> phi[1] -0.1032329  0.08747657