kc.moments {kin.cohort} | R Documentation |
Kin-cohort estimation of penetrance by the method of moments
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 method of moments described by Wacholder et al (1998)
Usage
kc.moments(t, delta, genes, r, knots, f, pw = rep(1,length(t)),
set = NULL, B = 1, logrank = TRUE, subset, trace=FALSE)
Arguments
t |
time variable. Usually age at diagnosis or at last follow-up |
delta |
disease status (1: event, 0: no event |
genes |
genotype of proband numeric. A factor is preferred, otherwise numeric code of genotypes (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 |
mutation allele frequency in the population |
pw |
prior weights, if needed |
set |
family id (only needed for bootstrap) |
B |
number of boostrap samples (only needed for bootstrap) |
logrank |
if logrank test is desired |
subset |
logical condition to subset data |
trace |
Show iterations for bootstrap |
Value
object of classes "kin.cohort" and "wacholder".
cumrisk |
matrix of dimension (number of knots x 3) with cumulative risk festimates or noncarriers, carriers and the cumulative risk ratio |
knots |
vector of knots |
km |
object class survfit (package survival) |
logrank |
p-value of the logrank test |
events |
matrix with number of events and person years per each knot |
call |
copy of call |
if bootstrap confidence intervals are requested (B>1) then the returned object is of classes "kin.cohort.boot" and "wacholder" 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
Wacholder S, Hartge P, Struewing JP, Pee D, McAdams M, Lawrence B, Tucker MA. The kin-cohort study for estimating penetrance. American Journal of Epidemiology. 1998; 148: 623-9.
See Also
kin.cohort
, print.kin.cohort
, plot.kin.cohort
Examples
## Not run:
data(kin.data)
attach(kin.data)
res.km<- kc.moments(age, cancer, gen1, rel, knots=c(30,40,50,60,70,80), f=0.02)
res.km
## End(Not run)