R/visualisations.R
plot_pmgl_vs_true.Rd
Creates a scatterplot of genetic liability against posterior mean genetic liability.
plot_pmgl_vs_true( dataset, line_color = "black", line_type = "dashed", label_size = 3, save_plot_path = FALSE, plot_filename = "posterior_liabilities.png" )
dataset | data imported to R by |
---|---|
line_color | color of identity line. |
line_type | type of identity line. |
label_size | the size of the boxes. |
save_plot_path | if |
plot_filename | name of the file to be saved, including file extension. Must be either .pdf, .png or .jpeg |
Either returns a ggplot
object or saves the plot to
save_plot_path
and returns NULL.
Visualises how well the posterior mean genetic liabilities fit the genetic liabilities.
An identity line is included to help see if the genetic liabilities are balanced above
and below for each posterior mean genetic liability. Furthermore, the color and labels
show each configuration class, which is detailed in
vignette("liability-distribution")
.
This function requires the user to run assign_ltfh_phenotype()
, and then
association_analysis(pheno_name = "LTFH_pheno")
. Data is loaded with
load_phenotypes()
.
vignette("ggplot2-specs", package = "ggplot2")
details the usage of
aesthetic parameters in ggplot2.