Learn R Programming

OPDOE (version 1.0-10)

triangular.test.norm: Triangular Test for Normal Data

Description

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

Usage

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.

Value

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

Details

One-sample:

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

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

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

\(\mu<\code{mu0}\) or \(\mu>\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 \(\mu_1=\code{mu1}\) \(\mu_2=\code{mu1}\) in both groups versus

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

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

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

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

Run this code
# NOT RUN {
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])
# }

Run the code above in your browser using DataLab