Learn R Programming

broom (version 0.4.3)

muhaz_tidiers: Tidying methods for kernel based hazard rate estimates

Description

These methods tidy the output of muhaz objects as returned by the muhaz function, which provides kernel based non-parametric hazard rate estimators.

Usage

# S3 method for muhaz
tidy(x, ...)

# S3 method for muhaz glance(x, ...)

Arguments

x

muhaz object

...

extra arguments (not used)

Value

All tidying methods return a data.frame without rownames, whose structure depends on the method chosen.

tidy.muhaz returns a tibble containing two columns: time at which the hazard rate was estimated and estimate.

glance.muhaz returns a one-row data.frame with the columns

nobs

Number of observations used for estimation

min.time

The minimum observed event or censoring time

max.time

The maximum observed event or censoring time

min.harzard

Minimal estimated hazard

max.hazard

Maximal estimated hazard

Details

The "augment" method is not useful and therefore not available for muhaz objects.

Examples

Run this code
# NOT RUN {
if (require("muhaz", quietly = TRUE)) {
  data(ovarian, package="survival")
  x <- muhaz(ovarian$futime, ovarian$fustat)
  tidy(x)
  glance(x)
}

# }

Run the code above in your browser using DataLab