This function plots the phenotypic correlation as a function of genetic relatedness.
ggPhenotypeByDegree(
df,
y_var,
y_se = NULL,
y_stem_se = NULL,
y_ci_lb = NULL,
y_ci_ub = NULL,
config = list(),
data_prep = TRUE,
...
)
A ggplot object containing the correlation plot.
Data frame containing pairwise summary statistics. Required columns:
Minimum relatedness per group
Maximum relatedness per group
Number of pairs at that relatedness
Indicator for shared nuclear environment (1 = yes, 0 = no)
Indicator for shared mitochondrial DNA (1 = yes, 0 = no)
Name of the y-axis variable column (e.g., "r_pheno_rho").
Name of the standard error column (e.g., "r_pheno_se").
Optional; base stem used to construct SE ribbon bounds. (e.g., "r_pheno")
Optional; lower bound for confidence interval (e.g., "r_pheno_ci_lb").
Optional; upper bound for confidence interval (e.g., "r_pheno_ci_ub").
A list of configuration overrides. Valid entries include:
Minimum number of pairs to include (default: 500)
Minimum degree of relatedness (default: 0)
Maximum degree of relatedness (default: 7)
Plot title
Plot subtitle
Paletteer color scale name (e.g., "ggthemes::calc")
If TRUE, only classic kin are shown
If TRUE, use classic kin × mtDNA for grouping
If TRUE, remove classic kin rows
If TRUE, remove non-classic sibs (default: TRUE)
If TRUE, annotate mother/father/sibling points
Relative x-axis shift for annotations
Relative y-axis shift for annotations
Size of geom_point points (default: 1)
If TRUE, x-axis uses degree-of-relatedness scaling
Grouping column name (default: mtdna_factor)
Number of decimal places for rounding (default: 2)
Tolerance % for matching known degrees
Maximum number of degrees to consider
Logical; if TRUE, performs data preparation steps.
Additional arguments passed to `ggplot2` functions.