Learn R Programming

sse (version 0.7-17)

Extracting from objects of class powPar: Extracting from an object of class '>powPar

Description

All information needed for the 'power-function' should be provided by an object of class powPar. To extract this information the function pp should be used.

Usage

pp(x, name)

Arguments

x

An object of class '>powPar.

name

A character indicating the name of the object to be extracted.

Value

Everything that can be stored within a list is possible.

See Also

For extracting individual elements of n, theta and xi the functions n, theta, or xi should be used.

Examples

Run this code
# NOT RUN {
psi <- powPar(theta = seq(from = 0.5, to = 1.5, by = 0.5),
              n = seq(from = 10, to = 30, by = 10),
              muA = 0,
              muB = 1)
              

pp(psi, name = "muA")

## an example of usage
powFun <- function(psi){
  power.t.test(n = n(psi),
               delta = pp(psi, "muA") - pp(psi, "muB"),
               sd = theta(psi)
               )$power
}

## testing the power-function
powFun(psi)
# }

Run the code above in your browser using DataLab