penmodel_c: Fit a penetrance model for competing risks data

View source: R/penmodel_c.R

penmodel_cR Documentation

Fit a penetrance model for competing risks data

Description

Fits a competing risks model for family data with ascertainment correction and provides model parameter estimates.

Usage

penmodel_c(formula1, formula2, cluster = "famID", gvar = "mgene", 
parms, cuts = NULL, data,  design = "pop", base.dist = "Weibull", 
frailty.dist = "none", agemin = NULL, robust = FALSE)

Arguments

formula1

A formula expression for event 1 as for other regression models. The response should be a survival object as returned by the Surv function. See the documentation for Surv, lm and formula for details.

formula2

A formula expression for event 2 as for other regression models. The response should be a survival object as returned by the Surv function. See the documentation for Surv, lm and formula for details.

cluster

Name of cluster variable. Default is "famID".

gvar

Name of genetic variable. Default is "mgene".

parms

list of Vectors of initial values for the parameters in each model including baseline parameters and regression coefficients and frailty parameters. parms = list(c(baseparm1, coef1), c(baseparms2, coef2), c(k1, k2), where baseparm1 and baseparm2 include the initial values for baseline parameters used for each base.dist; coef1 and coef2 include the initial values for regression coefficients for the variables specified in formula1 and formula2, respectively, and c(k1, k2) are the initial values for frailty parameters used for the specified frailty.distribution. See Details for more details.

cuts

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

data

Data frame generated from simfam or data frame containing variables named in the formula and specific variables: famID, indID, gender, currentage, mgene, time, status and weight with attr(data,"agemin") specified.

design

Study design of the family data. Possible choices are: "pop" and "pop+", where "pop" is for the population-based design with affected probands whose mutation status can be either carrier or non-carrier, "pop+" is similar to "pop" but with mutation carrier probands. Default is "pop".

base.dist

Vector of two baseline hazard distributions to be fitted for competing events. Possible choices for each event are: "Weibull", "loglogistic", "Gompertz", "lognormal", "gamma", "logBurr", 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 to fit a shared frailty model for competing events. Possible choices are: "gamma" for independent gamma, "lognormal" for independent log-normal, "cgamma" for correlated gamma, "clognormal" for correlated log-normal distributions, or "none" can be chosen to ignoring frailties in the model assuming no residual familial correlation given covariates. Default is "gamma").

agemin

Minimum age of disease onset or minimum age. Default is NULL.

robust

Logical; if TRUE, the robust ‘sandwich’ standard errors and variance-covariance matrix are provided, otherwise the conventional standard errors and variance-covariance matrix are provided.

Details

The shared frailty comepting risks model is fitted to family data with specified baseline hazard distributions and frailty distribution

Event 1:

h1(t|X,Z) = h01(t - t0) Z1 exp(βs1 * xs + βg1 * xg),

Event 2:

h2(t|X,Z) = h02(t - t0) Z2 exp(βs2 * xs + βg2 * xg),

where h01(t) and h02(t) are the baseline hazard functions for event 1 and event 2, respectively, which can be specified by base.dist. t0 is a minimum age of disease onset, Z1 and Z2 are frailties shared within families for each event and follow either a gamma, log-normal, correlateg gamma, or correlated log-normal distributions, which can be specified by frailty.dist. xx and xg indicate male (1) or female (0) and carrier (1) or non-carrier (0) of a main gene of interest, respectively. Additional covariates can be added to formula1 for event 1 and formula2 for event 2 in the model.

Choice of frailty distributions for competing risk models

frailty.dist = "gamma" shares the frailties within families generated from a gamma distribution independently for each competing event, where Zj follows Gamma(kj, 1/kj).

frailty.dist = "lognormal" shares the frailties within families generated from a log-normal distribution independently for each competing event, where Zj follows log-normal distribution with mean 0 and variance (1/kj.

frailty.dist = "cgamma" shares the frailties within families generated from a correlated gamma distribution to allow the frailties between two events to be correlated, where the correlated gamma frailties (Z1, Z2) are generated with three independent gamma frailties (Y0, Y1, Y2) as follows:

Z1 = k0/(k0 + k1) Y0 + Y1 Z2 = k0/(k0 + k2) Y0 + Y2

where Y0 from Gamma(k0, 1/k0);

Y1

from Gamma(k1, 1/(k0 + k1));

Y2

from Gamma(k2, 1/(k0 + k2)).

frailty.dist = "clognormal" shares the frailties within families generated from a correlated log-normal distribution where log(Zj) follows a normal distribution with mean 0, variance 1/kj and correlation between two events k0.

depend should specify the values of related frailty parameters: c(k1, k2) with frailty.dist = "gamma" or frailty.dist = "lognormal"; c(k1, k2, k0) for frailty.dist = "cgamma" or frailty.dist = "clognormal".

More details about the competing risks model for family data arising from population-based study designs (design="pop", "pop+" and their inference procedure based on the ascertainment-corrected likelihood approach can be found in Choi et al., 2021.

Note that the baseline parameters include lambda and rho, which represent the scale and shape parameters, respectively, and eta, additional parameter to specify for "logBurr" distribution. For the "lognormal" baseline distribution, lambda and rho represent the location and scale parameters for the normally distributed logarithm, where lambda can take any real values and rho > 0. For the other baselinse distributions, lambda > 0, rho > 0, and eta > 0. When a piecewise constant distribution is specified for the baseline hazards, base.dist="piecewise", baseparm should specify the initial interval-constant values, one more than the cut points specified bycuts.

Transformed baseline parameters are used for estimation; log transformation is applied to both scale and shape parameters (λ, ρ) for "Weibull", "loglogistic", "Gompertz" and "gamma" baselines, to (λ, ρ, η) for "logBurr" and to the piecewise constant parameters for a piecewise baseline hazard. For "lognormal" baseline distribution, the log transformation is applied only to ρ, not to λ, which represents the location parameter for the normally distributed logarithm.

Calculations of penetrance estimates and their standard errors and 95% confidence intervals at given ages can be obtained by penetrance function via Monte-Carlo simulations of the estimated penetrance model.

Value

Returns an object of class 'penmodel_c', including the following elements:

estimates

Parameter estimates of transformed baseline parameters and regression coefficients.

varcov

Variance-covariance matrix of parameter estimates obtained from the inverse of Hessian matrix.

varcov.robust

Robust ‘sandwich’ variance-covariance matrix of parameter estimates when robust=TRUE.

se

Standard errors of parameter estimates obtained from the inverse of Hessian matrix.

se.robust

Robust ‘sandwich’ standard errors of parameter estimates when robust=TRUE.

logLik

Loglikelihood value for the fitted penetrance model.

AIC

Akaike information criterion (AIC) value of the model; AIC = 2*k - 2*logLik, where k is the number of parameters used in the model.

Author(s)

Yun-Hee Choi

References

Choi, Y.-H., Jung, H., Buys, S., Daly, M., John, E.M., Hopper, J., Andrulis, I., Terry, M.B., Briollais, L. (2021) A Competing Risks Model with Binary Time Varying Covariates for Estimation of Breast Cancer Risks in BRCA1 Families, Statistical Methods in Medical Research 30 (9), 2165-2183. https://doi.org/10.1177/09622802211008945.

Choi, Y.-H., Briollais, L., He, W. and Kopciuk, K. (2021) FamEvent: An R Package for Generating and Modeling Time-to-Event Data in Family Designs, Journal of Statistical Software 97 (7), 1-30. doi:10.18637/jss.v097.i07

See Also

simfam_c, penplot_c, print.penmodel_c, summary.penmodel_c, print.summary.penmodel_c, plot.penmodel_c

Examples


# Competing risk family data simulated from population-based design 
# using Weibull baseline hazards with gamma frailty distribution.
## Not run: 
set.seed(4321)
fam1 <- simfam_c(N.fam = 200, design = "pop+", variation = "frailty", competing=TRUE,
              base.dist = "Weibull", frailty.dist = "cgamma", depend=c(0.5, 1, 0.5), 
              allelefreq = 0.02, base.parms = list(c(0.01, 3), c(0.01, 3)), 
              vbeta = list(c(-1.13, 2.35), c(-1, 2)))

# Fitting shared gamma frailty Penetrance model for simulated competing risk data

fit1 <- penmodel_c(
        formula1 = Surv(time, status==1) ~ gender + mgene, 
        formula2 = Surv(time, status==2) ~ gender + mgene,
        cluster = "famID", gvar = "mgene", design = "pop+",  
        parms = list(c(0.01, 3, -1, 2), c(0.01, 3, -1, 2), c(0.5, 1)),
        base.dist = "Weibull", frailty.dist = "gamma", data = fam1, robust = TRUE)

# Fitting shared correlated gamma frailty Penetrance model for simulated competing risk data

fit2 <- penmodel_c(
        formula1 = Surv(time, status==1) ~ gender + mgene, 
        formula2 = Surv(time, status==2) ~ gender + mgene,
        cluster = "famID", gvar = "mgene", design = "pop+",  
        parms = list(c(0.01, 3, -1, 2), c(0.01, 3, -1, 2), c(0.5, 1, 0.5)),
        base.dist = "Weibull", frailty.dist = "cgamma", data = fam1, robust = TRUE)

# Summary of the model parameter estimates from the model fit

summary(fit1)

# Plot the lifetime penetrance curves with 95
# gender and mutation status groups along with their nonparametric penetrance curves  
# based on data excluding probands. 

plot(fit1, add.CIF = TRUE, conf.int = TRUE, MC = 100)

## End(Not run)

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