Skip to content

varChars

Thomas P Spargo edited this page Oct 17, 2022 · 1 revision

varChars function documentation

Updated 17/10/2022

The repository is maintained by Thomas Spargo (thomas.spargo@kcl.ac.uk) - please reach out with any questions.


Description

A subfunction to be called within simADPenetrance. Defines a matrix indicating disease onset characteristics of people with and without a variant (the 'f' and 'g' risk associated groups). Output is to be passed to the affAtAge/genFamily functions.

Usage examples

Set a lifetime penetrance of 0.75, where onset may occur across 10 time points, with no risk in people without the tested variant: varChars(f=0.75,g=0,numsteps=10,onsetRateDiff=1)

Arguments

f - max (lifetime) penetrance for people with variant.

g - max (lifetime) risk for people without variant.

numsteps - final time interval across which to consider for onset (between time 0:numsteps).

onsetRateDiff - time-scaling factor for group f vs group g.

Output

A matrix of class var.Char.matrix. The matrix contains 5 columns:

  • step: Sampling timepoint between 0 and numsteps where 0 is the last age before the disease becomes penetrant in any person.

  • f_propAff: Proportion of all people harbouring a variant of lifetime penetrance f who will be affected at time point step.

  • g_propAff: Proportion of all people with lifetime disease risk g (since variant f is absent) who will be affected at time point step.

  • f_step: Probability of being affected by time step if harbouring f.

  • g_step: Probability of being affected by time step if having lifetime risk g (i.e. not harbouring f).

Clone this wiki locally