Learn R Programming

FamEvent (version 2.1)

penetrance: Penetrance function and confidence intervals

Description

Estimates the cumulative disease risks (penetrances) and confidence intervals at given age(s) based on the fitted penetrance model.

Usage

penetrance(fit, fixed, age, CI = TRUE, MC = 100)

Arguments

fit

An object class of 'penmodel', a fitted model by penmodel or penmodelEM functions.

fixed

Vector of fixed values of the covariates used for penetrance calculation.

age

Vector of ages used for penetrance calculation.

CI

Logical; if TRUE, the 95% confidence interval will be obtained using a Monte-Carlo method, otherwise no confidence interval will be provided. Default is TRUE.

MC

Number of simulated samples used to calculate confidence intervals with a Monte-Carlo method. If MC=0, no confidence intervals will be calculated. Default value is 100.

Value

Returns the following values:

age

Ages at which the penetrances are calculated.

penetrance

Penetrance estimates at given ages.

lower

Lower limit of the 95% confidence interval; simulation-based 2.5th percentile of the penetrance estimates.

upper

Upper limit of the 95% confidence interval; simulation-based 97.5th percentile of the penetrance estimates.

se

Simulation-based standard errors of the penetrance estimates.

Details

The penetrance function is defined as the probability of developing a disease by age \(t\) given fixed values of covariates \(x\), $$ P(T < t | x) = 1 - S(t; x),$$ where \(t\) is greater than the minimum age and \(S(t; x)\) is the survival distribution based on a proportional hazards model with a specified baseline hazard distribution.

The proportional hazards model is specified as:

where is the baseline hazards function, \(x\) is the vector of covariates and is the vector of corresponding regression coefficients.

Calculations of standard errors of the penetrance estimates and 95% confidence intervals (CIs) for the penetrance at a given age are based on Monte-Carlo simulations of the estimated penetrance model.

A multivariate normal distribution is assumed for the parameter estimates, and MC = n sets of the parameters are generated from the multivariate normal distribution with the parameter estimates and their variance-covariance matrix. For each simulated set, a penetrance estimate is calculated at a given age by substituting the simulated parameters into the penetrance function.

The standard error of the penetrance estimate at a given age is calculated by the standard deviation of penetrance estimates obtained from \(n\) simulations.

The 95% CI for the penetrance at a given age is calculated using the 2.5th and 97.5th percentiles of the penetrance estimates obtained from \(n\) simulations.

See Also

simfam, penmodel, penmodelEM

Examples

Run this code
# NOT RUN {
  set.seed(4321)
  fam <- simfam(N.fam = 100, design = "pop+", base.dist = "Weibull", allelefreq = 0.02, 
         base.parms = c(0.01,3), vbeta = c(-1.13, 2.35))
	
  fit <- penmodel(Surv(time, status) ~ gender +  mgene, cluster = "famID", 
         parms = c(0.01, 3, -1.13, 2.35),  data = fam, base.dist = "Weibull", design = "pop+")
 
 # Compute penetrance estimates for male carriers at age 40, 50, 60, and 70 and
 # their 95% CIs based on 100 Monte Carlo simulations.
 
 penetrance(fit, fixed = c(1,1), age = c(40, 50, 60, 70), CI = TRUE, MC = 100)

# }

Run the code above in your browser using DataLab