| triangular.test.norm {OPDOE} | R Documentation |
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 |
y |
initial data for group |
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 |
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
\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)
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
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])