power.plot {genpwr}R Documentation

Function to Plot Power Results

Description

Plot the power results by MAF, OR, Alpha or N

Usage

power.plot(
  data = NULL,
  x = "MAF",
  panel.by = "True.Model",
  y_limit = NULL,
  y_log = F,
  return_gg = F,
  linear.effect.measure = "ES",
  select.Alpha = NULL,
  select.OR = NULL,
  select.ES = NULL,
  select.N = NULL,
  select.MAF = NULL,
  select.Case.Rate = NULL,
  select.SD = NULL,
  select.True.Model = NULL,
  select.Test.Model = NULL
)

Arguments

data

The data frame result from power.calc

x

The desired variable on the y axis: "MAF", "OR", "Alpha", or "N_total"

panel.by

A grouping variable to panel the graphs by: "True.Model", "MAF", "OR", "Alpha", or "N_total"

y_limit

An object specifying the minimum and maximum of the y-axis (eg c(0,4)) default is NULL, which allows the limits to be picked automatically

y_log

Logical, specifying whether the y axis should be logarithmic. Default is F

return_gg

Logical, specifying whether to return the ggplot object instead of printing out the plot

linear.effect.measure

Should the graphs indicate ES values, or R2 values? (default ES)

select.Alpha

Only produce graphs for the specified Alpha level(s).

select.OR

Only produce graphs for the specified odds ratio(s).

select.ES

Only produce graphs for the specified effect sizes(s).

select.N

Only produce graphs for the specified sample size(s).

select.MAF

Only produce graphs for the specified minor allele frequency(ies).

select.Case.Rate

Only produce graphs for the specified case rate(s).

select.SD

Only produce graphs for the specified standard deviation(s).

select.True.Model

Only produce graphs for the specified true genetic model(s): "Additive", "Dominant", "Recessive".

select.Test.Model

Only produce graphs for the specified testing model(s): "Additive", "Dominant", "Recessive", "2df".

Value

A series of plots with power on the Y axis.

Examples

pw <- power.calc(N=1000, Case.Rate=c(0.5), k=NULL,
    MAF=seq(0.15, 0.2, 0.01), OR=1.5,Alpha=c(0.05),
    True.Model='All', Test.Model='All')


[Package genpwr version 1.0.4 Index]