View source: R/event_prediction.R
create_tte_prior | R Documentation |
This is a function to create a patient-level prior data set from a specified Curve.
It can be used to create a prior data set where only summary parameters are known.
It requires a 'curve' object containing the desired distribution, the 'time' over which events occur and the number of 'events'.
Designed to be used in conjunction with event prediction methods.
Note that the output can be 'too perfect', so that when the output is used for curve-fitting it may result in over-precision.
To minimise this effect, it may better to derive the prior data set using a different distribution to the one later used for fitting or specifying down-weighting.
create_tte_prior(
curve,
duration,
events,
Time = "Time",
Event = "Event",
censoringOne = FALSE
)
curve |
Curve object with the desired prior distribution |
duration |
The positive number for the time over which events should occur. This controls data maturity. When used as a prior, the longer the time, the more information is provided. |
events |
The positive integer for the number of events that should occur. The more events, the more information contained when used as a prior. |
Time |
The output column name for the times. Default is "Time" |
Event |
The output column name for the events column (i.e. the binary variable denoting events vs censorings). Default is "Event" |
censoringOne |
Specify whether output censoring is denoted in the Event column by a one (TRUE) or zero (FALSE). Default=FALSE (censorings denoted by 0, events by 1) |
A two-column data frame containing times in the first column and an event/censoring indicator in the second.
James Bell
example_prior <- create_tte_prior(curve=Weibull(100,0.8),duration=20,events=50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.