penplot_c: Plot penetrance functions from competing risk models

View source: R/penplot_c.R

penplot_cR Documentation

Plot penetrance functions from competing risk models

Description

Plots the penetrance functions from competing risk models given the values of baseline parameters and regression coefficients and choices of baseline and frailty distributions.

Usage

penplot_c(event, base.parms, vbeta, cuts = NULL, variation = "none", 
          base.dist = "Weibull", frailty.dist = NULL, depend = c(1, 1), 
          agemin = 20, agemax = 80, print = TRUE, 
          col = c("blue","red","blue","red"),  lty = c(1, 1, 2, 2), 
          add.legend = TRUE, add.title = TRUE, x = "topleft", 
          y = NULL, xlab = "Age at onset", ylab = "Penetrance", 
          ylim = NULL, main = NULL, ...)

Arguments

event

Event of interest for penetrance function: either 1 or 2. Default is 1.

base.parms

List of vectors of parameter values for the specified baseline hazard functions for both events. For example, base.parms = list(c(lambda1, rho1), c(lambda2, rho2)) should be specified when base.dist = c("Weibull", "Weibull").

vbeta

List of vectors of regression coefficients for gender and majorgene, vbeta = list(c(beta1.s, beta1.g), c(beta2.s, beta2.g)) for both events. If variation = "secondgene", regression coefficients for gender, major gene and second gene, vbeta = list(c(beta1.s, beta1.g1, beta1.g2), c(beta2.s, beta2.g1, beta2.g2)), should be specified for each event.

cuts

Vector of cut points defining the intervals when base.dist = "piecewise" is specified and must be strictly positive and finite and greater than agemin. Default is NULL.

variation

Source of residual familial correlation. Possible choices are: "frailty" for frailty shared within families, "secondgene" for second gene variation, or "none" for no residual familial correlation. Default is "none".

base.dist

Vector of two baseline hazard distributions chosen for competing events. Possible choices are: "Weibull", "loglogistic", "Gompertz", "lognormal", "gamma", or "piecewise".If only one distribution is specified, the same distribution will be assumed for both events. A vector of two distributions should be specified if different baseline distributions are assumed for different events. Default is c("Weibull", "Weibull").

frailty.dist

Choice of frailty distribution. Possible choices are "gamma" for independent gamma, "lognormal" for independent log-normal, "cgamma" for correlated gamma, "clognormal" for correlated log-normal distribution when variation = "frailty" or "none" or NULL when no frailty distribution is assumed. Default is NULL.

depend

Vector of frailty parameter values assumed for specified frailty distribution. They corresponds inverse of variance of the frailty distribution. Dependence within families decreases with depend value. Default value is c(1,1).

agemin

Minimum age of disease onset. Default is 20 years of age.

agemax

Maximum age of disease onset. Default is 80 years of age.

print

Logical; if TRUE, prints the penetrance values by age 70 obtained from the assumed model for male carriers, female carriers, male noncarrers, and female noncarriers. Default is TRUE.

col

Colors of lines for male carriers, female carriers, male noncarrers, and female noncarriers. Default is c("blue", "red", "blue", "red").

lty

Types of lines for male carriers, female carriers, male noncarriers, and female noncarriers. Default is c(1, 1, 2, 2).

add.legend

Logical; if TRUE, displays legend in the plot. Default is TRUE.

add.title

Logical; if TRUE, displays title in the plot. Default is TRUE.

x, y

Position of legend; see legend. Defaults are x = "topleft", y = NULL.

xlab

Title for the x-axis. Default is "Age at Onset".

ylab

Title for the y-axis. Default is "Penetrance".

ylim

Limits of the y-axis. Default is NULL. If NULL, ylim will be automatically determined.

main

Main title of the plot. Default is NULL. If NULL, the title will be automatically created.

...

Other parameters to be passed through to plotting functions.

Details

Cause-specific proportional hazard models The penetrance models for competing events conditional on the covariates X = c(xs, xg) are assumed to have the following hazard functions for event j = 1, 2: hj(t|X) = h0j(t - t0) exp(βjs * xs + βjg * xg), where h0j(t) is the baseline hazard function for event j, j=1,2, t0j is a minimum age of disease onset, xs and xg indicate male (1) or female (0) and carrier (1) or non-carrier (0) of a major gene of interest, respectively.

The penetrance function for the penetrance model has the form, 1 - exp(- H0(t - t0) * exp(βs * xs + βg * xg )), where H0(t) is the cumulative baseline hazard function.

Shared frailty models

The penetrance model conditional on the frailty Z and covariates X = c(xs, xg) is assumed to have the following hazard function: h(t|X,Z) = h0(t - t0) Z exp(βs * xs + βg * xg), where h0(t) is the baseline hazard function, t0 is a minimum age of disease onset, xx and xg indicate male (1) or female (0) and carrier (1) or non-carrier (0) of a main gene of interest, respectively.

For example, when using a Weibull distribution for baseline hazard and a gamma distribution for frailty, the penetrance function has the form 1 - (1 + λρ * (t - t0)ρ * exp(βs * xs + βg * xg)/κ).

Two-gene models

The penetrance curve for the two-gene model is generated by 1 - exp(- H0(t - t0) * exp(βs * xs + β1 * x1 + β2 * x2)), where H0(t) is the cumulative baseline hazard function, x1 indicates carrior (1) or non-carrior (0) of a major gene and x2 indicates carrior (1) or non-carrior (0) of a second gene. When plotting with the two-gene model, the plot will generate separate curves for mutation carriers and noncarriers, and separate curves for the second gene carriers and noncarriers.

Value

Displays plots of the penetrance functions and returns the following values:

pen70

Penetrance estimates by age 70 specific to gender and mutation-status subgroups.

x.age

Vector of ages of onset ranging from agemin to agemax years

pen

Penetrance estimates computed at each age of x.age; if variation = "none" or "frailty", it includes subgroups specific to gender and mutation status for major gene. If variation = "secondgene", it includes subgroups specific to gender and both mutation statuses for major gene and second gene.

Author(s)

Yun-Hee Choi

See Also

simfam_c, plot.penmodel_c

Examples

# Penetrance function curves for event 1 
# based on Weibull baselines (no frailty)
penplot_c(event=1, base.parms = list(c(0.01,3), c(0.01, 3)), 
        vbeta = list(c(-1, 2), c(-1, 1)), variation = "none", 
        base.dist = "Weibull", agemin = 20, ylim = c(0,1))

# Penetrance function curves for event 1 
# based on gamma frailty and Weibull baselines
penplot_c(event=1, base.parms = list(c(0.01,3), c(0.01, 3)), 
        vbeta = list(c(-1, 2), c(-1, 1)), depend=c(2, 2), 
        variation = "frailty", frailty.dist="gamma", base.dist = "Weibull", 
        agemin = 20, ylim = c(0,1))

# Penetrance function curves for event 1 
# based on correlated gamma frailty and Weibull baselines
penplot_c(event=1, base.parms = list(c(0.01,3), c(0.01, 3)), 
        vbeta = list(c(-1, 2), c(-1, 1)), depend=c(2, 2, 0.2), 
        variation = "frailty", frailty.dist="cgamma", 
        base.dist = "Weibull", agemin = 20, ylim = c(0,1))

# Penetrance function curves for event 1 
# based on correlated lognormal frailty and Weibull baselines
penplot_c(event=1, base.parms = list(c(0.01,3), c(0.01, 3)), 
        vbeta = list(c(-1, 2), c(-1, 1)), depend=c(2, 2, 0.2), 
        variation = "frailty", frailty.dist="clognormal", 
        base.dist = "Weibull", agemin = 20, ylim = c(0,1))

FamEvent documentation built on Nov. 17, 2022, 5:06 p.m.