Number of observations contributing to a fitted flexible survival model
# S3 method for flexsurvreg
nobs(object, cens = TRUE, ...)
This returns the mod$N
component of the fitted
model object mod
. See flexsurvreg
,
flexsurvspline
for full documentation of all components.
Output from flexsurvreg
or
flexsurvspline
, representing a fitted survival model object.
Include censored observations in the number. TRUE
by default.
If FALSE
then the number of observed events is returned. See
BIC.flexsurvreg
for a discussion of the issues
with defining the sample size for censored data.
Further arguments passed to or from other methods. Currently unused.
C. H. Jackson chris.jackson@mrc-bsu.cam.ac.uk
By default, this matches the behaviour of the nobs
method for survreg
objects, including both censored and uncensored observations.
If a weighted flexsurvreg
analysis was done, then this function returns the sum of the weights.
flexsurvreg
, flexsurvspline
.