plot.power.bftest: Plot method for class '"power.bftest"'

View source: R/powerbf01.R

plot.power.bftestR Documentation

Plot method for class "power.bftest"

Description

Plot method for class "power.bftest"

Usage

## S3 method for class 'power.bftest'
plot(
  x,
  nlim = c(2, 500),
  ngrid = 100,
  type = "l",
  plot = TRUE,
  nullplot = TRUE,
  ...
)

Arguments

x

Object of class "power.bftest"

nlim

Range of sample sizes over which the power should be computed. Defaults to c(2, 500)

ngrid

Number of grid point for which power should be computed. Defaults to 100

type

Type of plot. Defaults to "l" (line-plot)

plot

Logical indicating whether data should be plotted. If FALSE only the data used for plotting are returned.

nullplot

Logcal indicating whether a second plot with the power in favor of the null (using a Bayes factor threshold of 1/k) should be created. Defaults to TRUE

...

Other arguments (for consistency with the generic)

Value

Plots power curves (if specified) and invisibly returns a list of data frames containing the data underlying the power curves

Author(s)

Samuel Pawel

See Also

powerbf01, powertbf01, powernmbf01

Examples

ssd1 <- powerbf01(k = 1/6, power = 0.95, pm = 0, psd = 1/sqrt(2), dpm = 0.5, dpsd = 0)
plot(ssd1, nlim = c(1, 8000))

power1 <- powerbf01(k = 1/2, n = 120, pm = 0, psd = 1/sqrt(2), dpm = 0.5, dpsd = 0)
plot(power1, nlim = c(1, 1000))


bfpwr documentation built on June 8, 2025, 1:40 p.m.