triangular.test.norm: Triangular Test for Normal Data

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

View source: R/triangular.test.R

Description

Performs a sequential test, compares means of two normally distributed groups.

Usage

1
2
3
triangular.test.norm(x, y = NULL, mu0 = NULL, mu1, mu2 = NULL,
                     delta = NULL, sigma = NULL, sigma2 = NULL,
                     alpha = 0.05, beta = 0.1, plot = TRUE)

Arguments

x

initial data for group x, at least 1 entry.

y

initial data for group y, at least 1 entry for a two sample test, otherwise omitted.

mu0

specifies Null and alternative hypothesis, see Details below.

mu1

specifies Null and alternative hypothesis, see Details below.

mu2

specifies Null and alternative hypothesis, see Details below.

delta

The minimum difference to be detected, alternative way to specify mu2=m1+delta, see above, use either this or mu2.

sigma

prior sigma.

sigma2

prior sigma for group 2 if different than for grouop 1.

alpha

Risk of 1st kind

beta

Risk of 2nd kind

plot

logical, indicates whether a initial plot should be generated.

Details

One-sample:

This function performs a one- or two-sided sequential Test for μ=\code{mu1} versus

μ>\code{mu2}, if mu2 > mu1 (one-sided)

μ<\code{mu2}, if mu2 < mu1 (one-sided)

μ<\code{mu0} or μ>\code{mu2}, if mu2 > mu1 and mu0 < mu1 (two-sided, possibly unsymmetric)

Two-sample:

This function performs a one- or two-sided sequential Test for equal means μ_1=\code{mu1} μ_2=\code{mu1} in both groups versus

μ_2>\code{mu2}, if mu2 > mu1 (one-sided)

μ_2<\code{mu2}, if mu2 < mu1 (one-sided)

μ_2<\code{mu0} or μ_2>\code{mu2}, if mu2 > mu1 and mu0 < mu1 (two-sided, possibly unsymmetric)

Value

An object of class triangular.test, to be used for later update steps.

Note

A two-sided test may be specified by supplying both mu1 and mu2, even unsymmetric if needed.

Author(s)

Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt

References

Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt: Optimal Experimental Design with R, Chapman and Hall/CRC, 2011

See Also

triangular.test, triangular.test.prop, update.triangular.test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
data(heights)
attach(heights)
# a symmetric two sided alternative:
tt <- triangular.test.norm(x=female[1:3],
   y=male[1:3], mu1=170,mu2=176,mu0=164,
   alpha=0.05, beta=0.2,sigma=7)
# Test is yet unfinished, add the remaining values step by step:
tt <- update(tt,x=female[4])
tt <- update(tt,y=male[4])
tt <- update(tt,x=female[5])
tt <- update(tt,y=male[5])
tt <- update(tt,x=female[6])
tt <- update(tt,y=male[6])
tt <- update(tt,x=female[7])
tt <- update(tt,y=male[7])
# Test is finished now
# an unsymmetric two sided alternative:
tt2 <- triangular.test.norm(x=female[1:3],
   y=male[1:3], mu1=170,mu2=180,mu0=162,
   alpha=0.05, beta=0.2,sigma=7)
tt2 <- update(tt2,x=female[4])

OPDOE documentation built on May 1, 2019, 8:45 p.m.