Family function for a censored Poisson response.

cens.poisson(link = "loglink", imu = NULL,
             biglambda = 10, smallno = 1e-10)

Arguments

Link function applied to the mean; see Links for more choices.

imu

Optional initial value; see CommonVGAMffArguments for more information.

biglambda, smallno

Used to help robustify the code when lambda is very large and the ppois value is so close to 0 that the first derivative is computed to be a NA or NaN. When this occurs mills.ratio is called.

Details

Often a table of Poisson counts has an entry J+ meaning \(\ge J\). This family function is similar to poissonff but handles such censored data. The input requires SurvS4. Only a univariate response is allowed. The Newton-Raphson algorithm is used.

Value

An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm and vgam.

References

See survival for background.

Author

Thomas W. Yee

Note

The function poissonff should be used when there are no censored observations. Also, NAs are not permitted with SurvS4, nor is type = "counting".

Warning

As the response is discrete, care is required with Surv (the old class because of setOldClass(c("SurvS4", "Surv")); see setOldClass), especially with "interval" censored data because of the (start, end] format. See the examples below. The examples have y < L as left censored and y >= U (formatted as U+) as right censored observations, therefore L <= y < U is for uncensored and/or interval censored observations. Consequently the input must be tweaked to conform to the (start, end] format.

A bit of attention has been directed to try robustify the code when lambda is very large, however this currently works for left and right censored data only, not interval censored data. Sometime the fix involves an approximation, hence it is a good idea to set trace = TRUE.

Examples

# Example 1: right censored data
set.seed(123); U <- 20
cdata <- data.frame(y = rpois(N <- 100, exp(3)))
cdata <- transform(cdata, cy = pmin(U, y),
                          rcensored = (y >= U))
cdata <- transform(cdata, status = ifelse(rcensored, 0, 1))
with(cdata, table(cy))
#> cy
#> 12 13 14 15 16 17 18 19 20 
#>  2  1  6  4  5  9  9 12 52 
with(cdata, table(rcensored))
#> rcensored
#> FALSE  TRUE 
#>    48    52 
with(cdata, table(print(SurvS4(cy, status))))  # Check; U+ means >= U
#>        time status
#>   [1,]   17      1
#>   [2,]   20      0
#>   [3,]   12      1
#>   [4,]   20      0
#>   [5,]   20      0
#>   [6,]   20      0
#>   [7,]   14      1
#>   [8,]   12      1
#>   [9,]   20      0
#>  [10,]   20      0
#>  [11,]   20      0
#>  [12,]   20      0
#>  [13,]   17      1
#>  [14,]   20      0
#>  [15,]   20      0
#>  [16,]   19      1
#>  [17,]   16      1
#>  [18,]   15      1
#>  [19,]   18      1
#>  [20,]   15      1
#>  [21,]   17      1
#>  [22,]   19      1
#>  [23,]   14      1
#>  [24,]   14      1
#>  [25,]   18      1
#>  [26,]   14      1
#>  [27,]   20      0
#>  [28,]   20      0
#>  [29,]   20      0
#>  [30,]   20      0
#>  [31,]   20      0
#>  [32,]   19      1
#>  [33,]   18      1
#>  [34,]   18      1
#>  [35,]   16      1
#>  [36,]   20      0
#>  [37,]   19      1
#>  [38,]   20      0
#>  [39,]   15      1
#>  [40,]   18      1
#>  [41,]   17      1
#>  [42,]   14      1
#>  [43,]   20      0
#>  [44,]   19      1
#>  [45,]   19      1
#>  [46,]   20      0
#>  [47,]   19      1
#>  [48,]   20      0
#>  [49,]   13      1
#>  [50,]   15      1
#>  [51,]   20      0
#>  [52,]   20      0
#>  [53,]   17      1
#>  [54,]   20      0
#>  [55,]   14      1
#>  [56,]   20      0
#>  [57,]   20      0
#>  [58,]   20      0
#>  [59,]   20      0
#>  [60,]   20      0
#>  [61,]   17      1
#>  [62,]   16      1
#>  [63,]   16      1
#>  [64,]   20      0
#>  [65,]   20      0
#>  [66,]   17      1
#>  [67,]   20      0
#>  [68,]   19      1
#>  [69,]   20      0
#>  [70,]   20      0
#>  [71,]   18      1
#>  [72,]   20      0
#>  [73,]   19      1
#>  [74,]   20      0
#>  [75,]   20      0
#>  [76,]   20      0
#>  [77,]   18      1
#>  [78,]   20      0
#>  [79,]   20      0
#>  [80,]   20      0
#>  [81,]   20      0
#>  [82,]   17      1
#>  [83,]   20      0
#>  [84,]   18      1
#>  [85,]   20      0
#>  [86,]   19      1
#>  [87,]   20      0
#>  [88,]   20      0
#>  [89,]   20      0
#>  [90,]   20      0
#>  [91,]   20      0
#>  [92,]   17      1
#>  [93,]   19      1
#>  [94,]   16      1
#>  [95,]   20      0
#>  [96,]   19      1
#>  [97,]   20      0
#>  [98,]   20      0
#>  [99,]   20      0
#> [100,]   18      1
#> attr(,"type")
#> [1] "right"
#> attr(,"class")
#> [1] "SurvS4"
#> 
#>  0  1 12 13 14 15 16 17 18 19 20 
#>  0  0  0  0  0  0  0  0  0  0  0 
fit <- vglm(SurvS4(cy, status) ~ 1, cens.poisson, data = cdata,
            trace = TRUE)
#> Iteration 1: loglikelihood = -164.29209
#> Iteration 2: loglikelihood = -164.17535
#> Iteration 3: loglikelihood = -164.1743
#> Iteration 4: loglikelihood = -164.17429
#> Iteration 5: loglikelihood = -164.17429
coef(fit, matrix = TRUE)
#>             loglink(mu)
#> (Intercept)    3.007622
table(print(depvar(fit)))  # Another check; U+ means >= U
#>     time status
#> 1     17      1
#> 2     20      0
#> 3     12      1
#> 4     20      0
#> 5     20      0
#> 6     20      0
#> 7     14      1
#> 8     12      1
#> 9     20      0
#> 10    20      0
#> 11    20      0
#> 12    20      0
#> 13    17      1
#> 14    20      0
#> 15    20      0
#> 16    19      1
#> 17    16      1
#> 18    15      1
#> 19    18      1
#> 20    15      1
#> 21    17      1
#> 22    19      1
#> 23    14      1
#> 24    14      1
#> 25    18      1
#> 26    14      1
#> 27    20      0
#> 28    20      0
#> 29    20      0
#> 30    20      0
#> 31    20      0
#> 32    19      1
#> 33    18      1
#> 34    18      1
#> 35    16      1
#> 36    20      0
#> 37    19      1
#> 38    20      0
#> 39    15      1
#> 40    18      1
#> 41    17      1
#> 42    14      1
#> 43    20      0
#> 44    19      1
#> 45    19      1
#> 46    20      0
#> 47    19      1
#> 48    20      0
#> 49    13      1
#> 50    15      1
#> 51    20      0
#> 52    20      0
#> 53    17      1
#> 54    20      0
#> 55    14      1
#> 56    20      0
#> 57    20      0
#> 58    20      0
#> 59    20      0
#> 60    20      0
#> 61    17      1
#> 62    16      1
#> 63    16      1
#> 64    20      0
#> 65    20      0
#> 66    17      1
#> 67    20      0
#> 68    19      1
#> 69    20      0
#> 70    20      0
#> 71    18      1
#> 72    20      0
#> 73    19      1
#> 74    20      0
#> 75    20      0
#> 76    20      0
#> 77    18      1
#> 78    20      0
#> 79    20      0
#> 80    20      0
#> 81    20      0
#> 82    17      1
#> 83    20      0
#> 84    18      1
#> 85    20      0
#> 86    19      1
#> 87    20      0
#> 88    20      0
#> 89    20      0
#> 90    20      0
#> 91    20      0
#> 92    17      1
#> 93    19      1
#> 94    16      1
#> 95    20      0
#> 96    19      1
#> 97    20      0
#> 98    20      0
#> 99    20      0
#> 100   18      1
#> attr(,"class")
#> [1] "SurvS4"
#> attr(,"type")
#> [1] "right"
#> 
#>  0  1 12 13 14 15 16 17 18 19 20 
#>  0  0  0  0  0  0  0  0  0  0  0 

# Example 2: left censored data
L <- 15
cdata <- transform(cdata,
               cY = pmax(L, y),
               lcensored = y <  L)  # Note y < L, not cY == L or y <= L
cdata <- transform(cdata, status = ifelse(lcensored, 0, 1))
with(cdata, table(cY))
#> cY
#> 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 
#> 13  5  9  9 12  8 11  9  4  4  8  3  2  1  2 
with(cdata, table(lcensored))
#> lcensored
#> FALSE  TRUE 
#>    91     9 
with(cdata, table(print(SurvS4(cY, status, type = "left"))))  # Check
#>        time status
#>   [1,]   17      1
#>   [2,]   25      1
#>   [3,]   15      0
#>   [4,]   20      1
#>   [5,]   27      1
#>   [6,]   22      1
#>   [7,]   15      0
#>   [8,]   15      0
#>   [9,]   25      1
#>  [10,]   21      1
#>  [11,]   21      1
#>  [12,]   20      1
#>  [13,]   17      1
#>  [14,]   25      1
#>  [15,]   23      1
#>  [16,]   19      1
#>  [17,]   16      1
#>  [18,]   15      1
#>  [19,]   18      1
#>  [20,]   15      1
#>  [21,]   17      1
#>  [22,]   19      1
#>  [23,]   15      0
#>  [24,]   15      0
#>  [25,]   18      1
#>  [26,]   15      0
#>  [27,]   24      1
#>  [28,]   24      1
#>  [29,]   23      1
#>  [30,]   23      1
#>  [31,]   22      1
#>  [32,]   19      1
#>  [33,]   18      1
#>  [34,]   18      1
#>  [35,]   16      1
#>  [36,]   23      1
#>  [37,]   19      1
#>  [38,]   25      1
#>  [39,]   15      1
#>  [40,]   18      1
#>  [41,]   17      1
#>  [42,]   15      0
#>  [43,]   21      1
#>  [44,]   19      1
#>  [45,]   19      1
#>  [46,]   26      1
#>  [47,]   19      1
#>  [48,]   26      1
#>  [49,]   15      0
#>  [50,]   15      1
#>  [51,]   21      1
#>  [52,]   21      1
#>  [53,]   17      1
#>  [54,]   29      1
#>  [55,]   15      0
#>  [56,]   21      1
#>  [57,]   22      1
#>  [58,]   20      1
#>  [59,]   24      1
#>  [60,]   29      1
#>  [61,]   17      1
#>  [62,]   16      1
#>  [63,]   16      1
#>  [64,]   22      1
#>  [65,]   20      1
#>  [66,]   17      1
#>  [67,]   20      1
#>  [68,]   19      1
#>  [69,]   20      1
#>  [70,]   21      1
#>  [71,]   18      1
#>  [72,]   22      1
#>  [73,]   19      1
#>  [74,]   21      1
#>  [75,]   25      1
#>  [76,]   22      1
#>  [77,]   18      1
#>  [78,]   25      1
#>  [79,]   24      1
#>  [80,]   22      1
#>  [81,]   21      1
#>  [82,]   17      1
#>  [83,]   25      1
#>  [84,]   18      1
#>  [85,]   21      1
#>  [86,]   19      1
#>  [87,]   21      1
#>  [88,]   20      1
#>  [89,]   28      1
#>  [90,]   20      1
#>  [91,]   25      1
#>  [92,]   17      1
#>  [93,]   19      1
#>  [94,]   16      1
#>  [95,]   22      1
#>  [96,]   19      1
#>  [97,]   26      1
#>  [98,]   27      1
#>  [99,]   22      1
#> [100,]   18      1
#> attr(,"type")
#> [1] "left"
#> attr(,"class")
#> [1] "SurvS4"
#> 
#>  0  1 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 
#>  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 
fit <- vglm(SurvS4(cY, status, type = "left") ~ 1, cens.poisson,
            data = cdata, trace = TRUE)
#> Iteration 1: loglikelihood = -267.92333
#> Iteration 2: loglikelihood = -267.43783
#> Iteration 3: loglikelihood = -267.43756
#> Iteration 4: loglikelihood = -267.43756
coef(fit, matrix = TRUE)
#>             loglink(mu)
#> (Intercept)    2.991431

# Example 3: interval censored data
cdata <- transform(cdata, Lvec = rep(L, len = N),
                          Uvec = rep(U, len = N))
cdata <-
  transform(cdata,
        icensored = Lvec <= y & y < Uvec)  # Not lcensored or rcensored
with(cdata, table(icensored))
#> icensored
#> FALSE  TRUE 
#>    61    39 
cdata <- transform(cdata, status = rep(3, N))  # 3 == interval censored
cdata <- transform(cdata,
         status = ifelse(rcensored, 0, status))  # 0 means right censored
cdata <- transform(cdata,
         status = ifelse(lcensored, 2, status))  # 2 means left  censored
# Have to adjust Lvec and Uvec because of the (start, end] format:
cdata$Lvec[with(cdata,icensored)] <- cdata$Lvec[with(cdata,icensored)]-1
cdata$Uvec[with(cdata,icensored)] <- cdata$Uvec[with(cdata,icensored)]-1
# Unchanged:
cdata$Lvec[with(cdata, lcensored)] <- cdata$Lvec[with(cdata, lcensored)]
cdata$Lvec[with(cdata, rcensored)] <- cdata$Uvec[with(cdata, rcensored)]
with(cdata,  # Check
 table(ii <- print(SurvS4(Lvec, Uvec, status, type = "interval"))))
#>        time    status
#>   [1,]   14 19      3
#>   [2,]   20  1      0
#>   [3,]   15  1      2
#>   [4,]   20  1      0
#>   [5,]   20  1      0
#>   [6,]   20  1      0
#>   [7,]   15  1      2
#>   [8,]   15  1      2
#>   [9,]   20  1      0
#>  [10,]   20  1      0
#>  [11,]   20  1      0
#>  [12,]   20  1      0
#>  [13,]   14 19      3
#>  [14,]   20  1      0
#>  [15,]   20  1      0
#>  [16,]   14 19      3
#>  [17,]   14 19      3
#>  [18,]   14 19      3
#>  [19,]   14 19      3
#>  [20,]   14 19      3
#>  [21,]   14 19      3
#>  [22,]   14 19      3
#>  [23,]   15  1      2
#>  [24,]   15  1      2
#>  [25,]   14 19      3
#>  [26,]   15  1      2
#>  [27,]   20  1      0
#>  [28,]   20  1      0
#>  [29,]   20  1      0
#>  [30,]   20  1      0
#>  [31,]   20  1      0
#>  [32,]   14 19      3
#>  [33,]   14 19      3
#>  [34,]   14 19      3
#>  [35,]   14 19      3
#>  [36,]   20  1      0
#>  [37,]   14 19      3
#>  [38,]   20  1      0
#>  [39,]   14 19      3
#>  [40,]   14 19      3
#>  [41,]   14 19      3
#>  [42,]   15  1      2
#>  [43,]   20  1      0
#>  [44,]   14 19      3
#>  [45,]   14 19      3
#>  [46,]   20  1      0
#>  [47,]   14 19      3
#>  [48,]   20  1      0
#>  [49,]   15  1      2
#>  [50,]   14 19      3
#>  [51,]   20  1      0
#>  [52,]   20  1      0
#>  [53,]   14 19      3
#>  [54,]   20  1      0
#>  [55,]   15  1      2
#>  [56,]   20  1      0
#>  [57,]   20  1      0
#>  [58,]   20  1      0
#>  [59,]   20  1      0
#>  [60,]   20  1      0
#>  [61,]   14 19      3
#>  [62,]   14 19      3
#>  [63,]   14 19      3
#>  [64,]   20  1      0
#>  [65,]   20  1      0
#>  [66,]   14 19      3
#>  [67,]   20  1      0
#>  [68,]   14 19      3
#>  [69,]   20  1      0
#>  [70,]   20  1      0
#>  [71,]   14 19      3
#>  [72,]   20  1      0
#>  [73,]   14 19      3
#>  [74,]   20  1      0
#>  [75,]   20  1      0
#>  [76,]   20  1      0
#>  [77,]   14 19      3
#>  [78,]   20  1      0
#>  [79,]   20  1      0
#>  [80,]   20  1      0
#>  [81,]   20  1      0
#>  [82,]   14 19      3
#>  [83,]   20  1      0
#>  [84,]   14 19      3
#>  [85,]   20  1      0
#>  [86,]   14 19      3
#>  [87,]   20  1      0
#>  [88,]   20  1      0
#>  [89,]   20  1      0
#>  [90,]   20  1      0
#>  [91,]   20  1      0
#>  [92,]   14 19      3
#>  [93,]   14 19      3
#>  [94,]   14 19      3
#>  [95,]   20  1      0
#>  [96,]   14 19      3
#>  [97,]   20  1      0
#>  [98,]   20  1      0
#>  [99,]   20  1      0
#> [100,]   14 19      3
#> attr(,"type")
#> [1] "interval"
#> attr(,"class")
#> [1] "SurvS4"
#> 
#>  0  1  2  3 14 15 19 20 
#>  0  0  0  0  0  0  0  0 
fit <- vglm(SurvS4(Lvec, Uvec, status, type = "interval") ~ 1,
            cens.poisson, data = cdata, trace = TRUE)
#> Iteration 1: loglikelihood = -92.864355
#> Iteration 2: loglikelihood = -92.598948
#> Iteration 3: loglikelihood = -92.598882
#> Iteration 4: loglikelihood = -92.598882
coef(fit, matrix = TRUE)
#>             loglink(mu)
#> (Intercept)    2.996398
table(print(depvar(fit)))  # Another check
#>     time    status
#> 1     14 19      3
#> 2     20  1      0
#> 3     15  1      2
#> 4     20  1      0
#> 5     20  1      0
#> 6     20  1      0
#> 7     15  1      2
#> 8     15  1      2
#> 9     20  1      0
#> 10    20  1      0
#> 11    20  1      0
#> 12    20  1      0
#> 13    14 19      3
#> 14    20  1      0
#> 15    20  1      0
#> 16    14 19      3
#> 17    14 19      3
#> 18    14 19      3
#> 19    14 19      3
#> 20    14 19      3
#> 21    14 19      3
#> 22    14 19      3
#> 23    15  1      2
#> 24    15  1      2
#> 25    14 19      3
#> 26    15  1      2
#> 27    20  1      0
#> 28    20  1      0
#> 29    20  1      0
#> 30    20  1      0
#> 31    20  1      0
#> 32    14 19      3
#> 33    14 19      3
#> 34    14 19      3
#> 35    14 19      3
#> 36    20  1      0
#> 37    14 19      3
#> 38    20  1      0
#> 39    14 19      3
#> 40    14 19      3
#> 41    14 19      3
#> 42    15  1      2
#> 43    20  1      0
#> 44    14 19      3
#> 45    14 19      3
#> 46    20  1      0
#> 47    14 19      3
#> 48    20  1      0
#> 49    15  1      2
#> 50    14 19      3
#> 51    20  1      0
#> 52    20  1      0
#> 53    14 19      3
#> 54    20  1      0
#> 55    15  1      2
#> 56    20  1      0
#> 57    20  1      0
#> 58    20  1      0
#> 59    20  1      0
#> 60    20  1      0
#> 61    14 19      3
#> 62    14 19      3
#> 63    14 19      3
#> 64    20  1      0
#> 65    20  1      0
#> 66    14 19      3
#> 67    20  1      0
#> 68    14 19      3
#> 69    20  1      0
#> 70    20  1      0
#> 71    14 19      3
#> 72    20  1      0
#> 73    14 19      3
#> 74    20  1      0
#> 75    20  1      0
#> 76    20  1      0
#> 77    14 19      3
#> 78    20  1      0
#> 79    20  1      0
#> 80    20  1      0
#> 81    20  1      0
#> 82    14 19      3
#> 83    20  1      0
#> 84    14 19      3
#> 85    20  1      0
#> 86    14 19      3
#> 87    20  1      0
#> 88    20  1      0
#> 89    20  1      0
#> 90    20  1      0
#> 91    20  1      0
#> 92    14 19      3
#> 93    14 19      3
#> 94    14 19      3
#> 95    20  1      0
#> 96    14 19      3
#> 97    20  1      0
#> 98    20  1      0
#> 99    20  1      0
#> 100   14 19      3
#> attr(,"class")
#> [1] "SurvS4"
#> attr(,"type")
#> [1] "interval"
#> 
#>  0  1  2  3 14 15 19 20 
#>  0  0  0  0  0  0  0  0 

# Example 4: Add in some uncensored observations
index <- (1:N)[with(cdata, icensored)]
index <- head(index, 4)
cdata$status[index] <- 1  # actual or uncensored value
cdata$Lvec[index] <- cdata$y[index]
with(cdata, table(ii <- print(SurvS4(Lvec, Uvec, status,
                                     type = "interval"))))  # Check
#>        time    status
#>   [1,]   17  1      1
#>   [2,]   20  1      0
#>   [3,]   15  1      2
#>   [4,]   20  1      0
#>   [5,]   20  1      0
#>   [6,]   20  1      0
#>   [7,]   15  1      2
#>   [8,]   15  1      2
#>   [9,]   20  1      0
#>  [10,]   20  1      0
#>  [11,]   20  1      0
#>  [12,]   20  1      0
#>  [13,]   17  1      1
#>  [14,]   20  1      0
#>  [15,]   20  1      0
#>  [16,]   19  1      1
#>  [17,]   16  1      1
#>  [18,]   14 19      3
#>  [19,]   14 19      3
#>  [20,]   14 19      3
#>  [21,]   14 19      3
#>  [22,]   14 19      3
#>  [23,]   15  1      2
#>  [24,]   15  1      2
#>  [25,]   14 19      3
#>  [26,]   15  1      2
#>  [27,]   20  1      0
#>  [28,]   20  1      0
#>  [29,]   20  1      0
#>  [30,]   20  1      0
#>  [31,]   20  1      0
#>  [32,]   14 19      3
#>  [33,]   14 19      3
#>  [34,]   14 19      3
#>  [35,]   14 19      3
#>  [36,]   20  1      0
#>  [37,]   14 19      3
#>  [38,]   20  1      0
#>  [39,]   14 19      3
#>  [40,]   14 19      3
#>  [41,]   14 19      3
#>  [42,]   15  1      2
#>  [43,]   20  1      0
#>  [44,]   14 19      3
#>  [45,]   14 19      3
#>  [46,]   20  1      0
#>  [47,]   14 19      3
#>  [48,]   20  1      0
#>  [49,]   15  1      2
#>  [50,]   14 19      3
#>  [51,]   20  1      0
#>  [52,]   20  1      0
#>  [53,]   14 19      3
#>  [54,]   20  1      0
#>  [55,]   15  1      2
#>  [56,]   20  1      0
#>  [57,]   20  1      0
#>  [58,]   20  1      0
#>  [59,]   20  1      0
#>  [60,]   20  1      0
#>  [61,]   14 19      3
#>  [62,]   14 19      3
#>  [63,]   14 19      3
#>  [64,]   20  1      0
#>  [65,]   20  1      0
#>  [66,]   14 19      3
#>  [67,]   20  1      0
#>  [68,]   14 19      3
#>  [69,]   20  1      0
#>  [70,]   20  1      0
#>  [71,]   14 19      3
#>  [72,]   20  1      0
#>  [73,]   14 19      3
#>  [74,]   20  1      0
#>  [75,]   20  1      0
#>  [76,]   20  1      0
#>  [77,]   14 19      3
#>  [78,]   20  1      0
#>  [79,]   20  1      0
#>  [80,]   20  1      0
#>  [81,]   20  1      0
#>  [82,]   14 19      3
#>  [83,]   20  1      0
#>  [84,]   14 19      3
#>  [85,]   20  1      0
#>  [86,]   14 19      3
#>  [87,]   20  1      0
#>  [88,]   20  1      0
#>  [89,]   20  1      0
#>  [90,]   20  1      0
#>  [91,]   20  1      0
#>  [92,]   14 19      3
#>  [93,]   14 19      3
#>  [94,]   14 19      3
#>  [95,]   20  1      0
#>  [96,]   14 19      3
#>  [97,]   20  1      0
#>  [98,]   20  1      0
#>  [99,]   20  1      0
#> [100,]   14 19      3
#> attr(,"type")
#> [1] "interval"
#> attr(,"class")
#> [1] "SurvS4"
#> 
#>  0  1  2  3 14 15 16 17 19 20 
#>  0  0  0  0  0  0  1  2  1  0 
fit <- vglm(SurvS4(Lvec, Uvec, status, type = "interval") ~ 1,
            cens.poisson, data = cdata, trace = TRUE, crit = "c")
#> Iteration 1: coefficients = 3.0153027
#> Iteration 2: coefficients = 2.9962444
#> Iteration 3: coefficients = 2.9963726
#> Iteration 4: coefficients = 2.9963736
#> Iteration 5: coefficients = 2.9963736
coef(fit, matrix = TRUE)
#>             loglink(mu)
#> (Intercept)    2.996374
table(print(depvar(fit)))  # Another check
#>     time    status
#> 1     17  1      1
#> 2     20  1      0
#> 3     15  1      2
#> 4     20  1      0
#> 5     20  1      0
#> 6     20  1      0
#> 7     15  1      2
#> 8     15  1      2
#> 9     20  1      0
#> 10    20  1      0
#> 11    20  1      0
#> 12    20  1      0
#> 13    17  1      1
#> 14    20  1      0
#> 15    20  1      0
#> 16    19  1      1
#> 17    16  1      1
#> 18    14 19      3
#> 19    14 19      3
#> 20    14 19      3
#> 21    14 19      3
#> 22    14 19      3
#> 23    15  1      2
#> 24    15  1      2
#> 25    14 19      3
#> 26    15  1      2
#> 27    20  1      0
#> 28    20  1      0
#> 29    20  1      0
#> 30    20  1      0
#> 31    20  1      0
#> 32    14 19      3
#> 33    14 19      3
#> 34    14 19      3
#> 35    14 19      3
#> 36    20  1      0
#> 37    14 19      3
#> 38    20  1      0
#> 39    14 19      3
#> 40    14 19      3
#> 41    14 19      3
#> 42    15  1      2
#> 43    20  1      0
#> 44    14 19      3
#> 45    14 19      3
#> 46    20  1      0
#> 47    14 19      3
#> 48    20  1      0
#> 49    15  1      2
#> 50    14 19      3
#> 51    20  1      0
#> 52    20  1      0
#> 53    14 19      3
#> 54    20  1      0
#> 55    15  1      2
#> 56    20  1      0
#> 57    20  1      0
#> 58    20  1      0
#> 59    20  1      0
#> 60    20  1      0
#> 61    14 19      3
#> 62    14 19      3
#> 63    14 19      3
#> 64    20  1      0
#> 65    20  1      0
#> 66    14 19      3
#> 67    20  1      0
#> 68    14 19      3
#> 69    20  1      0
#> 70    20  1      0
#> 71    14 19      3
#> 72    20  1      0
#> 73    14 19      3
#> 74    20  1      0
#> 75    20  1      0
#> 76    20  1      0
#> 77    14 19      3
#> 78    20  1      0
#> 79    20  1      0
#> 80    20  1      0
#> 81    20  1      0
#> 82    14 19      3
#> 83    20  1      0
#> 84    14 19      3
#> 85    20  1      0
#> 86    14 19      3
#> 87    20  1      0
#> 88    20  1      0
#> 89    20  1      0
#> 90    20  1      0
#> 91    20  1      0
#> 92    14 19      3
#> 93    14 19      3
#> 94    14 19      3
#> 95    20  1      0
#> 96    14 19      3
#> 97    20  1      0
#> 98    20  1      0
#> 99    20  1      0
#> 100   14 19      3
#> attr(,"class")
#> [1] "SurvS4"
#> attr(,"type")
#> [1] "interval"
#> 
#>  0  1  2  3 14 15 16 17 19 20 
#>  0  0  0  0  0  0  1  2  1  0