power.image {exact.n}R Documentation

Image plot of power

Description

Creates image plot of exact power for range of values of n0 and n1. Optionally, the image plot will show where power exceeds a provided power target.

Usage

power.image(data, p = 0.2, binary = TRUE, beta = 0.75)

Arguments

data

a matrix of powers with columns named beta p0.vals, n0 and n1.

p

a scalar value for p0.vals that is used to select the subset of data.

binary

If TRUE only the binary indicator of power exceeding beta is displayed.

beta

target value of power

Details

data will be one of the 85 saved objects corresponding to a selected value of alpha and delta.

Value

No return value and if the 'binary' parameter is TRUE then an image will be displayed

Author(s)

Chris J. Lloyd

Examples

oldpar <- graphics::par()
# Load toy version of power library for alpha=0.025, delta=0.20.
rdata_file = system.file('files', 'LIB.a025.d20.Rdata', package = 'exact.n')
load(rdata_file)
graphics::par(mfrow=c(1,2))
power.image(LIB.a025.d20,p=.5,binary=FALSE)
power.image(LIB.a025.d20,p=.2,beta=.7,binary=TRUE)
suppressWarnings(graphics::par(oldpar))

[Package exact.n version 1.1.1 Index]