NormalAndTPower

0th

Percentile

Construct a power graph based on the NTplot.

Construct a power graph based on the NTplot. The exported function powerplot calls NormalAndTPower to construct a power curve or beta curve (operating characteristic curve) (or both) from its argument and catenates it to the original graph. The unexported function NormalAndTPower does the construction.

Keywords
hplot
Usage
powerplot(nt, ...)

# S3 method for NormalAndTplot powerplot(nt, power=TRUE, beta=FALSE, ..., hh=if (power && beta) c(6,2,2) else c(6,2))

NormalAndTPower(nt, which=c("power","beta"), digits=4, digits.top.axis=digits, digits.left=digits, col.power=attr(nt, "color")["col.power"], col.beta=attr(nt, "color")["col.beta"], cex.pb.axis=1, cex.left.axis=1, cex.xbar=1, lwd.reference=4, lwd.line=2, main=which, ...)

Arguments
nt

For the generic powerplot, an object. For the NormalAndTplot method, a "NormalAndTplot" object from NTplot.

power, beta

Logical. If TRUE, then display that graph, else don't display it. Used by powerplot.

which

Which graph is to be displayed? "power" for the power curve, or "beta" for the operating characteristic curve. Used by NormalAndTPower.

Additional arguments passed on to methods.

hh

The h argument for resizePanels.

digits.top.axis, digits.left, digits, cex.pb.axis, cex.left.axis, cex.xbar

digits.top.axis is the number of significant digits for the top axis. digits.left is the number of significant digits for the observed power or beta on the left axis. digits is a convenience argument to set both digits.axis and digits.left at the same time. These number is passed to the format function. cex.top.axis is the cex value for the top axis values. cex.left.axis is the cex value for the observed power or beta on the left axis. cex.xbar is the cex value for the horizontal axis.

col.power, col.beta

Colors used for the crosshairs on the power and beta panels. The default values are the colors used for the power and beta regions of the NTplot panel.

lwd.reference, lwd.line

lwd values for the power or beta panel. lwd.line is used for the power curve or beta curve. lwd.reference is used for the crosshairs.

main

Main title for graph.

Value

"trellis" object.

Aliases
  • NormalAndTPower
  • powerplot
  • powerplot.NormalAndTplot
  • power curve
  • beta curve
  • operating characteristic curve
Examples
# NOT RUN {
nt <- NTplot(mean0=2, mean1=4, sd=3, n=20, xlim=c(-.1, 6.1), xbar=3.5)
powerplot(nt)

# }
# NOT RUN {
tt <- NTplot(mean0=2, mean1=4, sd=3, n=20, xlim=c(-.1, 6.1), xbar=3.5, df=4, distribution.name="t")
powerplot(tt)

ntc <- NTplot(xbar=2, sd=3, n=20, xlim=c(-.1, 4.1), type="confidence",
              alpha.left=.025, alpha.right=.025)
ntc
try(powerplot(ntc))
# }
Documentation reproduced from package HH, version 3.1-35, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.