Skip to contents

Residuals for a fitted spbp model.

Usage

# S3 method for class 'spbp'
residuals(
  object,
  type = c("martingale", "deviance", "cox-snell", "coxsnell"),
  ...
)

Arguments

object

an object of class `spbp` result of a spbp fit.

type

type of residuals; default is "martingale". Also "deviance", "cox-snell", and "coxsnell" (alias).

...

arguments passed to parent method.

See also

Examples


library("spsurv")
data("veteran", package = "survival")
#> Warning: data set ‘veteran’ not found

fit <- bpph(Surv(time, status) ~ karno + factor(celltype),
  data = veteran
)

residuals(fit)
#>           1           2           3           4           5           6 
#>  0.62012438 -0.68017724 -0.23433469  0.30813759  0.52607059  0.84109337 
#>           7           8           9          10          11          12 
#>  0.18589263  0.67716929 -1.30150938 -0.39779219  0.78954424  0.93208590 
#>          13          14          15          16          17          18 
#> -1.01031644 -0.06463506  0.96280503  0.69524118 -3.40534506  0.93015375 
#>          19          20          21          22          23          24 
#>  0.68925894  0.87419421 -2.61670969 -1.09487732 -0.75670156 -0.61462190 
#>          25          26          27          28          29          30 
#>  0.28164055  0.60371215 -1.36432330  0.78127265  0.67660868  0.61287780 
#>          31          32          33          34          35          36 
#>  0.38838597  0.14201251  0.49869980  0.80172962  0.59344795 -2.21063597 
#>          37          38          39          40          41          42 
#>  0.55147784  0.45729393  0.24958927  0.72785212  0.57626711  0.90942791 
#>          43          44          45          46          47          48 
#>  0.06684959 -7.39407549  0.82178562  0.60560696 -0.13589088 -0.00240917 
#>          49          50          51          52          53          54 
#> -0.07581154 -0.21900023  0.76360267 -0.49696255  0.89340045  0.13771134 
#>          55          56          57          58          59          60 
#> -0.84008245  0.33414638 -1.22248186 -2.28902318 -1.07225466  0.85661493 
#>          61          62          63          64          65          66 
#> -0.04428468  0.18471294  0.12516508 -0.54661758  0.56867451  0.57311574 
#>          67          68          69          70          71          72 
#>  0.58176628 -0.37164482  0.24647128 -1.29984668  0.67097261 -0.25108514 
#>          73          74          75          76          77          78 
#> -1.70396306 -0.78030273 -3.14859095  0.55555474  0.98459651 -2.41317273 
#>          79          80          81          82          83          84 
#>  0.15402997  0.58932160  0.58444418 -0.42378384 -0.05469470  0.41033546 
#>          85          86          87          88          89          90 
#>  0.99392511  0.89282958  0.77858245  0.40123202  0.90448479  0.36448817 
#>          91          92          93          94          95          96 
#> -0.85615099  0.28016137  0.68100694  0.02636566  0.96532458  0.49869980 
#>          97          98          99         100         101         102 
#>  0.77034549  0.76004920  0.17932150  0.95903871  0.48461384  0.51561807 
#>         103         104         105         106         107         108 
#>  0.81619831  0.21485147 -0.21199281 -0.37608509  0.45360866  0.33180432 
#>         109         110         111         112         113         114 
#>  0.50741095 -0.41333041  0.74572394  0.18724608 -0.51259966  0.16975918 
#>         115         116         117         118         119         120 
#> -0.20442132  0.84445766  0.59240629 -2.58579087  0.81503809 -0.76491169 
#>         121         122         123         124         125         126 
#> -0.25470897  0.24513805  0.61756421 -0.31778563 -1.47507275  0.63070629 
#>         127         128         129         130         131         132 
#>  0.08104702  0.68368963  0.62291127  0.75327699  0.70004181 -0.37343725 
#>         133         134         135         136         137 
#>  0.36192212  0.15809741 -0.27298455 -0.54924555  0.12265347