Skip to contents

This function plots the Weibull PDF with credible intervals for the given data. It allows for visualization of density curves for individuals based on their genetic and demographic information.

Usage

plot_pdf(data, prob, max_age, sex = "NA")

Arguments

data

Data frame, containing individual demographic and genetic information. Must include columns for 'sex', 'age', 'aff' (affection status), and 'geno' (genotype).

prob

Numeric, the probability level for the credible intervals. Must be between 0 and 1.

max_age

Integer, the maximum age considered in the analysis.

sex

Character, specifying the sex of the individuals for the plot ("Male", "Female", or "NA" for not applicable). Default is "NA".

Value

A plot showing the Weibull PDF with credible intervals.