This function is under construction. Plan to release in an update after function level testing has been implemented.
sim_pop(nlives, hazard_rates, GRR, YOB, stop_year, RV_status = NULL,
carrier_prob = 0.002)
Numeric. The number of individuals to simulate
An object of class hazard
, created by hazard
.
Numeric. The genetic relative-risk of disease, i.e. the relative-risk of disease for individuals who carry at least one copy of the causal variant. Note: When simulating diseases with multiple subtypes GRR
must contain one entry for each simulated subtype. See details.
Numeric. The year of birth for all individuals in the sample.
Numeric. The last year of the study, i.e. the last year we can observe data.
Numeric. The rare variant status for all individuals in the study. RV_status = 1
if carrier of the cRV, otherwise RV_status = 0
. By default, RV_status = NULL
so that the cRV status is simulated based on carrier_prob
.
Numeric. The carrier probability for all causal variants with relative-risk of disease GRR
. By default, carrier_prob
= 0.002
A data frame of event times and classifiers for the simulated individuals.