histSimPower: Histograms

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Produce histograms for simulations of power and type-I-error of tests.

Usage

1
2
3
4
5
## S3 method for class 'sim.power.ttest'
hist(x, color.hline = "orange", ...)

## S3 method for class 'sim.power.wtest'
hist(x, color.hline = "orange", ...)

Arguments

x

object of class sim.power.ttest.

color.hline

color of horizontal line indicating uniform distribution of p values.

...

further arguments that may be passed through).

Details

The plot generates a ggplot2 object that is shown.

Missing values are handled by the ggplot2 functions.

Value

Object of class gg and ggplot.

Author(s)

Matthias Kohl [email protected]

See Also

hist

Examples

1
2
3
4
5
6
7
8
res1 <- sim.power.t.test(nx = 5, rx = rnorm, rx.H0 = rnorm, 
                        ny = 10, ry = function(x) rnorm(x, mean = 3, sd = 3), 
                        ry.H0 = function(x) rnorm(x, sd = 3))
hist(res1)
res2 <- sim.power.wilcox.test(nx = 6, rx = rnorm, rx.H0 = rnorm,
                      ny = 6, ry = function(x) rnorm(x, mean = 2), 
                      ry.H0 = rnorm)
hist(res2)

stamats/MKpower documentation built on Feb. 5, 2020, 5:36 p.m.