Description Usage Arguments Examples
Simulate survival time given age and a vector of HAQ scores
1 2 3 4 5 | sim_survtime(n = 1000, age = 55, haq0 = 1, male = 0,
haq = rep(haq0, 12/cycle_length * (100 - age + 1)),
ltfemale = iviRA::lifetable.female, ltmale = iviRA::lifetable.male,
x_mort = haq0, logor = iviRA::mort.or$logor, cycle_length = 6,
loghr = iviRA::mort.hr.haqdif$loghr)
|
n |
Number of observations |
age |
Age of patients. Length must be 1. |
haq0 |
Baseline HAQ. Length must be 1. |
male |
Vector indicating patient gender (1 = male, 0 = female) |
haq |
Vector of HAQ scores (e.g. HAQ trajectory) |
ltfemale |
Lifetable for women. Must contain column 'age' for single-year of age and 'qx' for the probability of death at a given age. |
ltmale |
Identical to |
x_mort |
Design matrix for mortality adjustment with odds ratios. Number of rows equal to n. |
logor |
Vector of log odds ratio mortality adjusters. Length equal to number of columns in x. |
cycle_length |
Length of model cycles in months. Default is 6 month cycles. |
loghr |
Log hazard ratio of impact of change in HAQ from baseline on mortality rate. A vector with each element denoting (in order) hazard ratio for month ≤ 6, 6 > month ≤ 12, 12 < month ≤ 24, 24 < month ≤ 36, month > 36. |
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.