sim_nFam: Simulate a nuclear family from a single founder

Description Usage Arguments Value

View source: R/PedSim_Functions.R

Description

Simulate all life events for an individual and create a nuclear family, when appropriate.

Usage

1
2
sim_nFam(found_info, stop_year, last_id, hazard_rates, NB_params, GRR,
  carrier_prob, RVfounder, fert)

Arguments

found_info

Data.frame with 1 row. All pedigree information for the founder, must contain all fields generated by create_pedFile.

stop_year

Numeric. The last year of study. If not supplied, defaults to the current year.

last_id

Numeric. The last id used in the pedigree.

hazard_rates

An object of class hazard, created by hazard.

NB_params

Numeric vector of length 2. The size and probability parameters of the negative binomial distribution used to model the number of children per household. By default, NB_params = c(2, 4/7), due to the investigation of Kojima and Kelleher (1962).

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.

carrier_prob

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

RVfounder

Logical. Indicates if all pedigrees segregate the rare, causal variant. By default, RVfounder = FALSE See details.

fert

Numeric. A constant used to rescale the fertility rate after disease-onset. By default, fert = 1.

Value

A pedigree with updated life events for the founder, and additional information for mate and offspring, when offspring are generated.


simrvprojects/SimRVPedigree documentation built on Feb. 12, 2020, 6:12 p.m.