sim_pop: Simulate survival data for a population sample

Description Usage Arguments Value

View source: R/Validation_Functions.R

Description

This function is under construction. Plan to release in an update after function level testing has been implemented.

Usage

1
2
sim_pop(nlives, hazard_rates, GRR, YOB, stop_year, RV_status = NULL,
  carrier_prob = 0.002)

Arguments

nlives

Numeric. The number of individuals to simulate

hazard_rates

An object of class hazard, created by hazard.

GRR

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.

YOB

Numeric. The year of birth for all individuals in the sample.

stop_year

Numeric. The last year of the study, i.e. the last year we can observe data.

RV_status

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.

carrier_prob

Numeric. The carrier probability for all causal variants with relative-risk of disease GRR. By default, carrier_prob = 0.002

Value

A data frame of event times and classifiers for the simulated individuals.


SimRVPedigree documentation built on Feb. 10, 2020, 1:07 a.m.