validate_survival_model {rprev} | R Documentation |
Tests that a custom survival object has the required attributes
for use in the prevalence
function.
Description
Runs checks to assess whether a custom survival model is
suitable for use in prevalence
. Provides useful
diagnostic messages if any issues are encountered.
Usage
validate_survival_model(object, data, timeframe = 3652, sample_size = 10)
Arguments
object |
The custom survival object. |
data |
Registry data in the form of a data frame. Ideally will be the same source that will be used for the prevalence estimation later on. |
timeframe |
Maximum time at which to test survival probability in days. If not supplied then chooses random values over a period of 10 years, which should be suitable for many diseases. |
sample_size |
The number of randomly drawn individuals to predict sample size for. |
Value
None. Instead, messages get displayed to the console.
[Package rprev version 1.0.5 Index]