tex: Preparing text for using with LaTeX

Description Usage Arguments Value Methods Examples

Description

Methods for function tex

Usage

1
tex(x, type, ...)

Arguments

x

The object of class power used for extraction

type

Currently available:

  • "drop", indicating the drop-out rate used for calculation.

  • "nRec", sample size that was increased to take into account the drop-out rate.

  • "nEval", sample size needed for evaluation without taking into account the drop-out rate.

  • "n.iter", nuber of iterations used for calculation.

  • "power", 'power' used for calculation.

  • "sampling", a description of the sampling process.

  • "theta", 'theta' used for calculation.

...

Not used so far

Value

A character string.

Methods

This methods prepare strings that can directly be used for including information from objects of power into Sweave reports.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## defining the range of n and theta to be evaluated
psi <- powPar(theta = seq(from = 0.5, to = 1.5, by = 0.1),
              n = seq(from = 20, to = 60, by = 2),
              muA = 0,
              muB = 1)

## defining a power-function     
powFun <- function(psi){
  power.t.test(n = n(psi)/2,
               delta = pp(psi, "muA") - pp(psi, "muB"),
               sd = theta(psi)
               )$power
}

## evaluating the power-function for all combinations of n and theta
calc <- powCalc(psi, powFun)

## adding example at theta of 1 and power of 0.9
pow <- powEx(calc, theta = 1, power = 0.9)

## drawing the power plot with 3 contour lines
plot(pow,
     xlab = "Standard Deviation",
     ylab = "Total Sample Size",
     at = c(0.85, 0.9, 0.95))

## 
tex(pow, type = "sampling")

sse documentation built on May 19, 2021, 3 p.m.

Related to tex in sse...