This function calculates the log likelihood using the clipp package for a set of parameters and data.
Usage
mhLogLikelihood_clipp(
paras,
families,
twins,
max_age,
baseline_data,
prev,
geno_freq,
trans,
BaselineNC,
ncores
)
Arguments
- paras
Numeric vector, the parameters for the Weibull distribution and scaling factors. Should contain in order: gamma_male, gamma_female, delta_male, delta_female, given_median_male, given_median_female, given_first_quartile_male, given_first_quartile_female.
- families
Data frame, containing pedigree information with columns for 'sex', 'age', 'aff' (affection status), and 'geno' (genotype).
- twins
Information on monozygous twins or triplets in the pedigrees.
- max_age
Integer, maximum age considered in the analysis.
- baseline_data
Numeric matrix, baseline risk data for each age by sex. Rows correspond to sex (1 for male, 2 for female) and columns to age.
- prev
Numeric, prevalence of the risk allele in the population.
- geno_freq
Numeric vector, represents the frequency of the risk type and its complement in the population.
- trans
Numeric matrix, transition matrix that defines the probabilities of allele transmission from parents to offspring.
- BaselineNC
Logical, indicates if non-carrier penetrance should be based on the baseline data or the calculated non-carrier penetrance.
- ncores
Integer, number of cores to use for parallel computation.