make_plot_pred_effect: Predicted versus reported effect sizes

View source: R/make_plot_predlnor.R

make_plot_pred_effectR Documentation

Predicted versus reported effect sizes

Description

Make a plot comparing the predicted effect sizes to the reported effect sizes.

Usage

make_plot_pred_effect(
  dat = NULL,
  Xlab = "Reported effect size",
  Ylab = "Expected effect size",
  subtitle = "",
  maf_filter = FALSE,
  bias = FALSE,
  Title = "Expected versus reported effect size",
  legend = TRUE,
  standard_errors = FALSE,
  pred_beta = "lnor_pred",
  pred_beta_se = "lnor_se_pred",
  beta = "lnor",
  se = "lnor_se",
  sd_est = "sd_est",
  exclude_1000G_MAF_refdat = TRUE,
  nocolour = FALSE,
  publication_quality = FALSE
)

Arguments

dat

the target dataset of interest

Xlab

label for X axis

Ylab

label for Y axis

subtitle

subtitle

maf_filter

minor allele frequency threshold. If not NULL, genetic variants with a minor allele frequency below this threshold are excluded

bias

logical argument. If TRUE, plots the % deviation of the expected from the reported effect size on the Y axis against the reported effect size on the X axis.

Title

plot title

legend

logical argument. If true, includes figure legend in plot

standard_errors

logical argument. If TRUE, plots the expected versus the reported standard errors for the effect sizes

pred_beta

name of column containing the predicted effect size

pred_beta_se

name of column containing the standard error for the predicted effect size

beta

name of column containing the reported effect size

se

name of column containing the standard error for the reported effect size

sd_est

the standard deviation of the phenotypic mean. Can either be a numeric vector of length 1 or name of the column in dat containing the standard deviation value (in which case should be constant across SNPs). Only applicable for continuous traits. If not supplied by the user, the standard deviation is approximated using sd_est, estimated by the predict_beta_sd() function. The sd_est is then used to standardise the reported effect size. If the reported effect size is already standardised (ie is in SD units) then sd_est should be set to NULL

exclude_1000G_MAF_refdat

exclude rsids from the 1000 genome MAF reference dataset.

nocolour

if TRUE, effect size conflicts are illustrated using shapes rather than colours. Default FALSE

publication_quality

produce a very high resolution image e.g. for publication purposes. Default FALSE

Value

plot


MRCIEU/mrQC documentation built on May 6, 2023, 1:40 p.m.