kc.marginal {kin.cohort} | R Documentation |
Marginal Maximum Likelihood estimation of kin-cohort data
Description
This function estimates cumulative risk and hazard at given ages for carriers and noncarriers of a mutation based on the probands genotypes. It uses the Marginal Maximum Likelihood estimation method (Chatterjee and Wacholder, 2001). Piece-wise exponential distribution is assumed for the survival function.
Usage
kc.marginal(t, delta, genes, r, knots, f, pw = rep(1,length(t)),
set = NULL, B = 1, maxit = 1000, tol = 1e-5, subset,
logrank=TRUE, trace=FALSE)
Arguments
t |
time variable. Usually age at diagnosis or at last follow-up |
delta |
disease status (1: event, 0: no event |
genes |
factor or numeric vector (1 gene), matrix or dataframe (2 genes) with genotypes of proband numeric. factors and data.frame with factors are prefered in order to use user-defined labels. Otherwise use codes (1:noncarrier, 2: carrier, 3: homozygous carrier) |
r |
relationship with proband 1:parent, 2:sibling 3:offspring 0:proband. Probands will be excluded from analysis and offspring will be recoded 1 internally. |
knots |
time points (ages) for cumulative risk and hazard estimates |
f |
vector of mutation allele frequencies in the population |
pw |
prior weights, if needed |
set |
family id (only needed for bootstrap) |
B |
number of boostrap samples (only needed for bootstrap) |
maxit |
max number of iterations for the EM algorithm |
tol |
convergence tolerance |
subset |
logical condition to subset data |
logrank |
Perform a logrank test |
trace |
Show iterations for bootstrap |
Value
object of classes "kin.cohort" and "chatterjee".
cumrisk |
matrix with cumulative risk estimates for noncarriers, carriers and the cumulative risk ratio. Estimates are given for the times indicated in the knot vector |
hazard |
matrix with hazard estimates for noncarriers, carriers and the hazard ratio. Estimates are given for the times indicated in the knot vector |
knots |
vector of knots |
conv |
if the EM algorithm converged |
niter |
number of iterations needed for convergence |
ngeno.rel |
number of combinations of genotypes in the relatives |
events |
matrix with number of events and person years per each knot |
logHR |
mean log hazard ratio estimate (unweighted) |
logrank |
logrank test. If 2 genes, for the main effects, the cross-classification and the stratified tests |
call |
copy of call |
if bootstrap confidence intervals are requested (B>1) then the returned object is of classes "kin.cohort.boot" and "chatterjee" with previous items packed in value estimate and each bootstrap sample packed in matrices.
Note
This function is best called by kin.cohort than directly
References
Chatterjee N and Wacholder S. A Marginal Likelihood Approach for Estimating Penetrance from Kin-Cohort Designs. Biometrics. 2001; 57: 245-52.
See Also
kin.cohort
, print.kin.cohort
, plot.kin.cohort
Examples
## Not run:
data(kin.data)
attach(kin.data)
res.mml<- kc.marginal(age, cancer, gen1, rel, knots=c(30,40,50,60,70,80), f=0.02)
res.mml
## End(Not run)