densityplot {comorbidPGS} | R Documentation |
Density Plot from a PGS Association
Description
densityplot()
take a distribution of PGS, a Phenotype and eventual Confounders
return a plot with density of PGS in x by Categories of the Phenotype
Usage
densityplot(
df = NULL,
prs_col = "SCORESUM",
phenotype_col = "Phenotype",
scale = TRUE,
threshold = NA
)
Arguments
df |
a dataframe with individuals on each row, and at least the following columns:
|
prs_col |
a character specifying the PGS column name |
phenotype_col |
a character specifying the Phenotype column name |
scale |
a boolean specifying if scaling of PGS should be done before plotting |
threshold |
a facultative numeric specifying for Continuous Phenotype the Threshold to consider individuals as Cases/Controls as following:
|
Value
return a ggplot object (ggplot2)