riskCurve: Fit a parametric risk curve

Description Usage Arguments Details Value

View source: R/riskCurve.R

Description

Fit a parametric risk curve

Usage

1
2
riskCurve(object, dataSample, timeInvariant = NULL, timeVarying = NULL,
  weights = NULL, level = c(0.9, 0.95), nSamples = 1000)

Arguments

object

a fitted model object

dataSample

a data.frame on which the curve is to be calibrated against. Must contain all predictors of object

timeInvariant

if not NULL, a 1 row data.frame setting time invariant variables used of the fit.

timeVarying

if not NULL, a data.frame with a column indicating years as in object as well as other time-varying covariates.

weights

optional vector of weights of length nrow(dataSample) (useful if object was fitted using a matched sample)

level

if not NULL levels for confidence intervals.

nSamples

if level is not NULL, number of Monte Carlo samples to be drawn to compute the confidence intervals around predictions.

Details

A risk curve is the cumulative probability of an event up to some time point. For instance, it would be the probability of having been fired up to year 2010. Confidence intervals around each event denote the probability of this event as opposed to other events. As such, confidence intervals for all events do not sum to 1. The risk curve is calibrated at mean sample values, using the data in dataSample.

Value

If level is NULL, a length(years) rows, 3 columns tibble with year, and probability for 2 of the three outcomes. If level is not NULL, a 2 * length(years) rows tibble with year and probability for 2 of the three outcomes, and as many columns as necessary for confidence intervals.


rferrali/rogali documentation built on May 26, 2019, 7 p.m.