Calculates the penetrance for an individual based on Weibull distribution parameters. This function estimates the probability of developing cancer given the individual's genetic and demographic information.
lik.fn(
i,
data,
alpha_male,
alpha_female,
beta_male,
beta_female,
delta_male,
delta_female,
gamma_male,
gamma_female,
max_age,
baselineRisk,
BaselineNC,
prev
)Numeric vector, containing penetrance values for unaffected and affected individuals.
Integer, index of the individual in the data set.
Data frame, containing individual demographic and genetic information. Must include columns for 'sex', 'age', 'aff' (affection status), and 'geno' (genotype).
Numeric, Weibull distribution shape parameter for males.
Numeric, Weibull distribution shape parameter for females.
Numeric, Weibull distribution scale parameter for males.
Numeric, Weibull distribution scale parameter for females.
Numeric, shift parameter for the Weibull function for males.
Numeric, shift parameter for the Weibull function for females.
Numeric, asymptote parameter for males (only scales the entire distribution).
Numeric, asymptote parameter for females (only scales the entire distribution).
Integer, maximum age considered in the analysis.
Numeric matrix, baseline risk for each age by sex. Columns correspond to sex (1 for male, 2 for female) and rows to age.
Logical, indicates if non-carrier penetrance should be based on SEER data.
Numeric, the carrier prevalence (heterozygote frequency) in the population. This should be approximately 2p where p is the allele frequency when the allele is rare.