qqunifSimPower: qq-Plots for Uniform Distribution

qqunifR Documentation

qq-Plots for Uniform Distribution

Description

Produce qq-plot(s) of the given effect size and p values assuming a uniform distribution.

Usage

qqunif(x, ...)

## Default S3 method:
qqunif(x, min = 0, max = 1, ...)

## S3 method for class 'sim.power.ttest'
qqunif(x, color.line = "orange", shape = 19, size = 1, 
                           alpha = 1, ...)

## S3 method for class 'sim.power.wtest'
qqunif(x, color.line = "orange", shape = 19, size = 1, 
                           alpha = 1, ...)

Arguments

x

numeric vector or data (object).

min

single numeric, lower limit of the distribution.

max

single numeric, upper limit of the distribution.

color.line

color of the line indicating the uniform distribution.

shape

point shape.

size

point size.

alpha

bleding factor (default: no blending.

...

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 Matthias.Kohl@stamats.de

Examples

## default
qqunif(runif(100))

## visualization of empirical power and type-I-error
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))
qqunif(res1, alpha = 0.1)

res2 <- sim.power.wilcox.test(nx = 6, rx = rnorm, rx.H0 = rnorm,
                      ny = 6, ry = function(x) rnorm(x, mean = 2), 
                      ry.H0 = rnorm)
qqunif(res2)

MKpower documentation built on April 23, 2023, 1:15 a.m.