penplot: Plot penetrance functions

View source: R/penplot.R

penplotR Documentation

Plot penetrance functions

Description

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

Usage

penplot(base.parms, vbeta, cuts = NULL, variation = "none", base.dist = "Weibull", 
frailty.dist = NULL, depend = 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

base.parms

Vector of parameter values for the specified baseline hazard function: base.parms = c(lambda, rho) should be specified for base.dist = "Weibull", "loglogistic", "Gompertz", "gamma", and "lognormal", c(lambda, rho, eta) for base.dist = "logBurr", or interval constant hazard values for the intervals produced by cuts for base.dist = "piecewise".

vbeta

Vector of regression coefficients for gender and majorgene, vbeta = c(beta.s, beta.g). If variation = "secondgene", regression coefficients for gender, major gene and second gene, vbeta = c(beta.s, beta.g1, beta.g2), should be specified.

cuts

Vector of cut points defining the intervals where the hazard function is constant. The cuts should be specified when base.dist = "piecewise" and must be strictly positive and finite. 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

Choice of baseline hazard distribution. Possible choices are: "Weibull", "loglogistic", "Gompertz", "lognormal", "gamma", or "piecewise". Default is "Weibull".

frailty.dist

Choice of frailty distribution. Possible choices are "gamma" for gamma distribution or "lognormal" for log normal distributions when variation = "frailty". Default is NULL.

depend

Variance of the frailty distribution. Dependence within families increases with depend value. Default value is 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

Proportional hazard models

The penetrance model conditional on the covariates X = c(xs, xg) is assumed to have the following hazard function: h(t|X) = h0(t - t0) 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.

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, plot.penmodel

Examples

# Penetrance function curves based on Weibull baseline hazard function

penplot(base.parms = c(0.01,3), vbeta = c(0.5, 2), variation = "none", base.dist = "Weibull", 
		agemin = 20, ylim = c(0,1))

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