Skip to contents

Residuals for a fitted spbp model.

Usage

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

Arguments

object

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

type

type of residuals, default is "cox-snell"

...

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
)
#> Priors are ignored because the MLE approach is used.

residuals(fit)
#>            1            2            3            4            5            6 
#>  0.620334637 -0.679329712 -0.234048610  0.308399983  0.526262765  0.841029191 
#>            7            8            9           10           11           12 
#>  0.186346929  0.677308728 -1.300459443 -0.397601203  0.789628851  0.932051075 
#>           13           14           15           16           17           18 
#> -1.009648339 -0.064630340  0.962790227  0.695189767 -3.404637146  0.930077293 
#>           19           20           21           22           23           24 
#>  0.689295435  0.874108576 -2.616623762 -1.094740847 -0.756867712 -0.614331758 
#>           25           26           27           28           29           30 
#>  0.281660460  0.603497345 -1.364514192  0.781192000  0.676650138  0.612729492 
#>           31           32           33           34           35           36 
#>  0.388102193  0.141959054  0.498496118  0.801697989  0.593493731 -2.210630824 
#>           37           38           39           40           41           42 
#>  0.551266290  0.457355446  0.249594050  0.727787821  0.576320124  0.909342384 
#>           43           44           45           46           47           48 
#>  0.067014526 -7.392625961  0.821644125  0.605292280 -0.135654282 -0.002393252 
#>           49           50           51           52           53           54 
#> -0.075701973 -0.218952653  0.763451331 -0.497053257  0.893286488  0.137875639 
#>           55           56           57           58           59           60 
#> -0.840368880  0.334047249 -1.222847163 -2.290331695 -1.072333558  0.856511572 
#>           61           62           63           64           65           66 
#> -0.044392189  0.184553623  0.125055545 -0.546723072  0.568631920  0.573143125 
#>           67           68           69           70           71           72 
#>  0.581796474 -0.371809934  0.246546098 -1.302280181  0.671111935 -0.250955665 
#>           73           74           75           76           77           78 
#> -1.703546731 -0.779830126 -3.152854360  0.555748234  0.984582969 -2.413723403 
#>           79           80           81           82           83           84 
#>  0.154461629  0.589439993  0.584493665 -0.423047323 -0.054329325  0.410449410 
#>           85           86           87           88           89           90 
#>  0.993919628  0.892850807  0.778676554  0.401436574  0.904463779  0.364320970 
#>           91           92           93           94           95           96 
#> -0.856070501  0.279896655  0.680797157  0.026518187  0.965282645  0.498496118 
#>           97           98           99          100          101          102 
#>  0.770133915  0.759974190  0.179411411  0.959001099  0.484664369  0.515693574 
#>          103          104          105          106          107          108 
#>  0.816144308  0.214948901 -0.211775050 -0.375897410  0.453513073  0.331655252 
#>          109          110          111          112          113          114 
#>  0.507211361 -0.413243410  0.745701258  0.187398459 -0.512263533  0.169920590 
#>          115          116          117          118          119          120 
#> -0.204116468  0.844329967  0.592410143 -2.585066006  0.814878573 -0.764883830 
#>          121          122          123          124          125          126 
#> -0.254845468  0.245306287  0.617419049 -0.317587040 -1.474425602  0.630745490 
#>          127          128          129          130          131          132 
#>  0.080912834  0.683546494  0.622953738  0.753130602  0.700049401 -0.373301618 
#>          133          134          135          136          137 
#>  0.361890596  0.158143324 -0.273187729 -0.549041344  0.122747302