Title: | Optimal Design of Experiments |
---|---|
Description: | Several function related to Experimental Design are implemented here, see "Optimal Experimental Design with R" by Rasch D. et. al (ISBN 9781439816974). |
Authors: | Petr Simecek <[email protected]>, Juergen Pilz <[email protected]>, Mingui Wang <[email protected]>, Albrecht Gebhardt <[email protected]>. |
Maintainer: | Albrecht Gebhardt <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0-10 |
Built: | 2024-11-16 06:29:34 UTC |
Source: | CRAN |
milk fat performance (in kg per lactation) of heifers of three sires from Holstein Frisian cattle to select the sire with the highest breeding value for milk fat performance.
data(cattle)
data(cattle)
The format is: num [1:5, 1:3] 132 128 135 121 138 173 166 172 176 169 ...
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt: Optimal Experimental Design with R, Chapman and Hall/CRC, 2011
data(cattle) size.seq_select.mean(data=cattle,delta=10, P=0.95)
data(cattle) size.seq_select.mean(data=cattle,delta=10, P=0.95)
Determines locations and number of replications for a polynomial regression design.
Needs specification of order of polynom, borders of intervall and total number of measurements as input.
design.regression.polynom(a, b, k, n) design.reg.polynom(...)
design.regression.polynom(a, b, k, n) design.reg.polynom(...)
a |
lower bound of interval |
b |
upper bound of interval |
k |
order of polynom |
n |
total number of planned measurements |
... |
only used for call wrapper |
Uses Legendre Polynomials to determine the support points for the design:
If ,
: places
support points in
, located at the roots of
where
is the Legendre polynomial of degree
).
Distributes the n
measurements almost equally over the
support points.
Object of class design.regression
design.reg.polynom
is a call wrapper for backward compatibility for
design.regression.polynom
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt: Optimal Experimental Design with R, Chapman and Hall/CRC, 2011
x <- design.reg.polynom(10, 100, 3, 45) x
x <- design.reg.polynom(10, 100, 3, 45) x
An design.regression
object is created with
design.regression.polynom
A triangular.test
object is a list of
model |
character, currently only |
locations |
choosen locations |
replications |
choosen replications per location |
interval |
vector of size 2 storing the given interval |
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt: Optimal Experimental Design with R, Chapman and Hall/CRC, 2011
Some stored Hadmard matrices, used in hadamard.matrix
Stored matrices from http://www2.research.att.com/~njas/hadamard/
filling the gaps up to 256 in hadamard.matrix
, 260 is the next gap.
Body heights of male and female students collected in a classroom experiment.
data(heights)
data(heights)
A data frame with 7 observations on the following 2 variables.
female
a numeric vector
male
a numeric vector
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt, Minghui Wang
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt: Optimal Experimental Design with R, Chapman and Hall/CRC, 2011
data(heights) attach(heights) 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: tt <- update(tt,x=female[4:7], y=male[4:7]) # Test is finished now
data(heights) attach(heights) 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: tt <- update(tt,x=female[4:7], y=male[4:7]) # Test is finished now
age and height of hemp plants.
data(hemp)
data(hemp)
A data frame with 14 observations on the following 2 variables.
x
a numeric vector
y
a numeric vector
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt: Optimal Experimental Design with R, Chapman and Hall/CRC, 2011
Undocumented / internal functions
Some of these functions are not intended to be called by the user, others still lack their own documentation page. In the mean time see the referenced book.
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt: Optimal Experimental Design with R, Chapman and Hall/CRC, 2011
Print method for a design.regression
object.
## S3 method for class 'design.regression' print(x, epl = 6, ...)
## S3 method for class 'design.regression' print(x, epl = 6, ...)
x |
|
epl |
integer, entries per line |
... |
additional print arguments |
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt: Optimal Experimental Design with R, Chapman and Hall/CRC, 2011
Prints a triangular.test
object.
## S3 method for class 'triangular.test' print(x, ...)
## S3 method for class 'triangular.test' print(x, ...)
x |
|
... |
additional paramters for |
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt: Optimal Experimental Design with R, Chapman and Hall/CRC, 2011
triangular.test.norm
, triangular.test.prop
model III and VII
Returns the optimal number of levels for factor A (and B).
size_a.three_way_mixed_cxbina.model_3_c(alpha, beta, delta, b, c, n, cases) size_a.three_way_mixed_cxbina.model_7_c(alpha, beta, delta, b, c, n, cases) size_ab.three_way_mixed_cxbina.model_7_c(alpha, beta, delta, c, n, cases)
size_a.three_way_mixed_cxbina.model_3_c(alpha, beta, delta, b, c, n, cases) size_a.three_way_mixed_cxbina.model_7_c(alpha, beta, delta, b, c, n, cases) size_ab.three_way_mixed_cxbina.model_7_c(alpha, beta, delta, c, n, cases)
alpha |
Risk of 1st kind |
beta |
Risk of 2nd kind |
delta |
The minimum difference to be detected |
b |
Number of levels of fixed factor B |
c |
Number of levels of fixed factor C |
n |
Number of replications |
cases |
Specifies whether the |
see chapter 3 in the referenced book
Integer(s) giving the size(s).
Better use size.anova
which allows a cleaner notation.
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt, Minghui Wang
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt: Optimal Experimental Design with R, Chapman and Hall/CRC, 2011
size_a.three_way_mixed_cxbina.model_3_c(0.05, 0.1, 0.5, 5, 4, 1, "maximin") size_a.three_way_mixed_cxbina.model_3_c(0.05, 0.1, 0.5, 5, 4, 1, "minimin") size_a.three_way_mixed_cxbina.model_7_c(0.05, 0.1, 0.5, 5, 4, 1, "maximin") size_a.three_way_mixed_cxbina.model_7_c(0.05, 0.1, 0.5, 5, 4, 1, "minimin") size_ab.three_way_mixed_cxbina.model_7_c(0.05,0.1,0.50, 5,2, "maximin") size_ab.three_way_mixed_cxbina.model_7_c(0.05,0.1,0.50, 5,2, "minimin")
size_a.three_way_mixed_cxbina.model_3_c(0.05, 0.1, 0.5, 5, 4, 1, "maximin") size_a.three_way_mixed_cxbina.model_3_c(0.05, 0.1, 0.5, 5, 4, 1, "minimin") size_a.three_way_mixed_cxbina.model_7_c(0.05, 0.1, 0.5, 5, 4, 1, "maximin") size_a.three_way_mixed_cxbina.model_7_c(0.05, 0.1, 0.5, 5, 4, 1, "minimin") size_ab.three_way_mixed_cxbina.model_7_c(0.05,0.1,0.50, 5,2, "maximin") size_ab.three_way_mixed_cxbina.model_7_c(0.05,0.1,0.50, 5,2, "minimin")
and
model III, IV and VII
Returns the optimal number of levels for factor B.
size_b.three_way_mixed_ab_in_c.model_3_a(alpha, beta, delta, a, c, n, cases)
size_b.three_way_mixed_ab_in_c.model_3_a(alpha, beta, delta, a, c, n, cases)
alpha |
Risk of 1st kind |
beta |
Risk of 2nd kind |
delta |
The minimum difference to be detected |
a |
Number of levels of fixed factor A |
c |
Number of levels of fixed factor C |
n |
Number of replications |
cases |
Specifies whether the |
see chapter 3 in the referenced book
Integer giving the size.
Better use size.anova
which allows a cleaner notation.
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt, Minghui Wang
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt: Optimal Experimental Design with R, Chapman and Hall/CRC, 2011
size_b.three_way_mixed_ab_in_c.model_3_a(0.05, 0.1, 0.5, 6, 5, 1, "maximin") size_b.three_way_mixed_ab_in_c.model_3_a(0.05, 0.1, 0.5, 6, 5, 1, "minimin") size_b.three_way_mixed_cxbina.model_4_a(0.05, 0.1, 0.5, 6, 4, 1, "maximin") size_b.three_way_mixed_cxbina.model_4_a(0.05, 0.1, 0.5, 6, 4, 1, "minimin") size_b.three_way_mixed_cxbina.model_4_c(0.05, 0.1, 0.5, 6, 4, 1, "maximin") size_b.three_way_mixed_cxbina.model_4_c(0.05, 0.1, 0.5, 6, 4, 1, "minimin") size_b.three_way_mixed_cxbina.model_4_axc(0.05, 0.1, 0.5, 6, 4, 1, "maximin") size_b.three_way_mixed_cxbina.model_4_axc(0.05, 0.1, 0.5, 6, 4, 1, "minimin") size_b.three_way_nested.model_6_a(0.05, 0.1, 0.5, 6, 4, 2, "maximin") size_b.three_way_nested.model_6_a(0.05, 0.1, 0.5, 6, 4, 2, "minimin")
size_b.three_way_mixed_ab_in_c.model_3_a(0.05, 0.1, 0.5, 6, 5, 1, "maximin") size_b.three_way_mixed_ab_in_c.model_3_a(0.05, 0.1, 0.5, 6, 5, 1, "minimin") size_b.three_way_mixed_cxbina.model_4_a(0.05, 0.1, 0.5, 6, 4, 1, "maximin") size_b.three_way_mixed_cxbina.model_4_a(0.05, 0.1, 0.5, 6, 4, 1, "minimin") size_b.three_way_mixed_cxbina.model_4_c(0.05, 0.1, 0.5, 6, 4, 1, "maximin") size_b.three_way_mixed_cxbina.model_4_c(0.05, 0.1, 0.5, 6, 4, 1, "minimin") size_b.three_way_mixed_cxbina.model_4_axc(0.05, 0.1, 0.5, 6, 4, 1, "maximin") size_b.three_way_mixed_cxbina.model_4_axc(0.05, 0.1, 0.5, 6, 4, 1, "minimin") size_b.three_way_nested.model_6_a(0.05, 0.1, 0.5, 6, 4, 2, "maximin") size_b.three_way_nested.model_6_a(0.05, 0.1, 0.5, 6, 4, 2, "minimin")
Returns the optimal number of obervations per level of factor B.
size_b.two_way_cross.mixed_model_a_fixed_a(alpha, beta, delta, a, n, cases) size_b.two_way_nested.b_random_a_fixed_a(alpha, beta, delta, a, cases)
size_b.two_way_cross.mixed_model_a_fixed_a(alpha, beta, delta, a, n, cases) size_b.two_way_nested.b_random_a_fixed_a(alpha, beta, delta, a, cases)
alpha |
Risk of 1st kind |
beta |
Risk of 2nd kind |
delta |
The minimum difference to be detected |
a |
Number of levels of fixed factor A |
n |
Number of replications |
cases |
Specifies whether the |
see chapter 3 in the referenced book
Integer giving the size.
Better use size.anova
which allows a cleaner notation.
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt, Minghui Wang
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt: Optimal Experimental Design with R, Chapman and Hall/CRC, 2011
size_b.two_way_cross.mixed_model_a_fixed_a(0.05,0.1, 1, 6, 1, "maximin") size_b.two_way_cross.mixed_model_a_fixed_a(0.05,0.1, 1, 6, 1, "minimin") size_b.two_way_cross.mixed_model_a_fixed_a(0.05,0.1, 1, 6, 2, "maximin") size_b.two_way_cross.mixed_model_a_fixed_a(0.05,0.1, 1, 6, 2, "minimin") size_b.two_way_nested.b_random_a_fixed_a(0.05, 0.1, 1, 6, "maximin") size_b.two_way_nested.b_random_a_fixed_a(0.05, 0.1, 1, 6, "minimin")
size_b.two_way_cross.mixed_model_a_fixed_a(0.05,0.1, 1, 6, 1, "maximin") size_b.two_way_cross.mixed_model_a_fixed_a(0.05,0.1, 1, 6, 1, "minimin") size_b.two_way_cross.mixed_model_a_fixed_a(0.05,0.1, 1, 6, 2, "maximin") size_b.two_way_cross.mixed_model_a_fixed_a(0.05,0.1, 1, 6, 2, "minimin") size_b.two_way_nested.b_random_a_fixed_a(0.05, 0.1, 1, 6, "maximin") size_b.two_way_nested.b_random_a_fixed_a(0.05, 0.1, 1, 6, "minimin")
Returns the optimal number of levels for factor B and C.
size_bc.three_way_cross.model_4_a_case1(alpha, beta, delta, a, n, cases) size_bc.three_way_cross.model_4_a_case2(alpha, beta, delta, a, n, cases) size_bc.three_way_mixed_cxbina.model_6_a_case1(alpha, beta, delta, a, n, cases) size_bc.three_way_mixed_cxbina.model_6_a_case2(alpha, beta, delta, a, n, cases)
size_bc.three_way_cross.model_4_a_case1(alpha, beta, delta, a, n, cases) size_bc.three_way_cross.model_4_a_case2(alpha, beta, delta, a, n, cases) size_bc.three_way_mixed_cxbina.model_6_a_case1(alpha, beta, delta, a, n, cases) size_bc.three_way_mixed_cxbina.model_6_a_case2(alpha, beta, delta, a, n, cases)
alpha |
Risk of 1st kind |
beta |
Risk of 2nd kind |
delta |
The minimum difference to be detected |
a |
Number of levels of fixed factor A |
n |
Number of replications |
cases |
Specifies whether the |
see chapter 3 in the referenced book
Integers giving the sizes.
Better use size.anova
which allows a cleaner notation.
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt, Minghui Wang
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt: Optimal Experimental Design with R, Chapman and Hall/CRC, 2011
size_bc.three_way_cross.model_4_a_case1(0.05, 0.1, 0.5, 6, 2, "maximin") size_bc.three_way_cross.model_4_a_case1(0.05, 0.1, 0.5, 6, 2, "minimin") size_bc.three_way_cross.model_4_a_case1(0.05, 0.1, 1, 6, 2, "maximin") size_bc.three_way_cross.model_4_a_case1(0.05, 0.1, 1, 6, 2, "minimin") size_bc.three_way_cross.model_4_a_case2(0.05, 0.1, 0.5, 6, 2, "maximin") size_bc.three_way_cross.model_4_a_case2(0.05, 0.1, 0.5, 6, 2, "minimin") size_bc.three_way_cross.model_4_a_case2(0.05, 0.1, 1, 6, 2, "maximin") size_bc.three_way_cross.model_4_a_case2(0.05, 0.1, 1, 6, 2, "minimin") size_bc.three_way_mixed_cxbina.model_6_a_case1(0.05, 0.1, 0.5, 6, 2, "maximin") size_bc.three_way_mixed_cxbina.model_6_a_case1(0.05, 0.1, 0.5, 6, 2, "minimin") size_bc.three_way_mixed_cxbina.model_6_a_case2(0.05, 0.1, 0.5, 6, 2, "maximin") size_bc.three_way_mixed_cxbina.model_6_a_case2(0.05, 0.1, 0.5, 6, 2, "minimin")
size_bc.three_way_cross.model_4_a_case1(0.05, 0.1, 0.5, 6, 2, "maximin") size_bc.three_way_cross.model_4_a_case1(0.05, 0.1, 0.5, 6, 2, "minimin") size_bc.three_way_cross.model_4_a_case1(0.05, 0.1, 1, 6, 2, "maximin") size_bc.three_way_cross.model_4_a_case1(0.05, 0.1, 1, 6, 2, "minimin") size_bc.three_way_cross.model_4_a_case2(0.05, 0.1, 0.5, 6, 2, "maximin") size_bc.three_way_cross.model_4_a_case2(0.05, 0.1, 0.5, 6, 2, "minimin") size_bc.three_way_cross.model_4_a_case2(0.05, 0.1, 1, 6, 2, "maximin") size_bc.three_way_cross.model_4_a_case2(0.05, 0.1, 1, 6, 2, "minimin") size_bc.three_way_mixed_cxbina.model_6_a_case1(0.05, 0.1, 0.5, 6, 2, "maximin") size_bc.three_way_mixed_cxbina.model_6_a_case1(0.05, 0.1, 0.5, 6, 2, "minimin") size_bc.three_way_mixed_cxbina.model_6_a_case2(0.05, 0.1, 0.5, 6, 2, "maximin") size_bc.three_way_mixed_cxbina.model_6_a_case2(0.05, 0.1, 0.5, 6, 2, "minimin")
Returns the optimal number of levels for .
size_c.three_way_cross.model_3_a (alpha, beta, delta, a, b, n, cases) size_c.three_way_cross.model_3_axb (alpha, beta, delta, a, b, n, cases) size_c.three_way_mixed_ab_in_c.model_5_a (alpha, beta, delta, a, b, n, cases) size_c.three_way_mixed_ab_in_c.model_5_axb(alpha, beta, delta, a, b, n, cases) size_c.three_way_mixed_ab_in_c.model_5_b (alpha, beta, delta, a, b, n, cases) size_c.three_way_mixed_ab_in_c.model_6_b (alpha, beta, delta, a, b, n, cases) size_c.three_way_mixed_cxbina.model_5_a (alpha, beta, delta, a, b, n, cases) size_c.three_way_mixed_cxbina.model_5_b (alpha, beta, delta, a, b, n, cases) size_c.three_way_mixed_cxbina.model_7_b (alpha, beta, delta, a, b, n, cases) size_c.three_way_nested.model_5_a (alpha, beta, delta, a, b, n, cases) size_c.three_way_nested.model_5_b (alpha, beta, delta, a, b, n, cases) size_c.three_way_nested.model_7_b (alpha, beta, delta, a, b, n, cases)
size_c.three_way_cross.model_3_a (alpha, beta, delta, a, b, n, cases) size_c.three_way_cross.model_3_axb (alpha, beta, delta, a, b, n, cases) size_c.three_way_mixed_ab_in_c.model_5_a (alpha, beta, delta, a, b, n, cases) size_c.three_way_mixed_ab_in_c.model_5_axb(alpha, beta, delta, a, b, n, cases) size_c.three_way_mixed_ab_in_c.model_5_b (alpha, beta, delta, a, b, n, cases) size_c.three_way_mixed_ab_in_c.model_6_b (alpha, beta, delta, a, b, n, cases) size_c.three_way_mixed_cxbina.model_5_a (alpha, beta, delta, a, b, n, cases) size_c.three_way_mixed_cxbina.model_5_b (alpha, beta, delta, a, b, n, cases) size_c.three_way_mixed_cxbina.model_7_b (alpha, beta, delta, a, b, n, cases) size_c.three_way_nested.model_5_a (alpha, beta, delta, a, b, n, cases) size_c.three_way_nested.model_5_b (alpha, beta, delta, a, b, n, cases) size_c.three_way_nested.model_7_b (alpha, beta, delta, a, b, n, cases)
alpha |
Risk of 1st kind |
beta |
Risk of 2nd kind |
delta |
The minimum difference to be detected |
a |
Number of levels of fixed factor A |
b |
Number of levels of fixed factor B |
n |
Number of replications |
cases |
Specifies whether the |
see chapter 3 in the referenced book
integer, desired size of factor C
Better use size.anova
which allows a cleaner notation.
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt, Minghui Wang
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt: Optimal Experimental Design with R, Chapman and Hall/CRC, 2011
size_c.three_way_cross.model_3_a(0.05, 0.1, 0.5, 6, 5, 2, "maximin") size_c.three_way_cross.model_3_a(0.05, 0.1, 0.5, 6, 5, 2, "minimin") size_c.three_way_cross.model_3_axb(0.05, 0.1, 0.5, 6, 5, 2, "maximin") size_c.three_way_cross.model_3_axb(0.05, 0.1, 0.5, 6, 5, 2, "minimin") size_c.three_way_mixed_ab_in_c.model_5_a(0.05, 0.1, 0.5, 6, 5, 1, "maximin") size_c.three_way_mixed_ab_in_c.model_5_a(0.05, 0.1, 0.5, 6, 5, 1, "minimin") size_c.three_way_mixed_ab_in_c.model_5_axb(0.05, 0.1, 0.5, 6, 5, 1, "maximin") size_c.three_way_mixed_ab_in_c.model_5_axb(0.05, 0.1, 0.5, 6, 5, 1, "minimin") size_c.three_way_mixed_ab_in_c.model_5_b(0.05, 0.1, 0.5, 6, 5, 1, "maximin") size_c.three_way_mixed_ab_in_c.model_5_b(0.05, 0.1, 0.5, 6, 5, 1, "minimin") size_c.three_way_mixed_ab_in_c.model_6_b(0.05, 0.1, 0.5, 6, 5, 1, "maximin") size_c.three_way_mixed_ab_in_c.model_6_b(0.05, 0.1, 0.5, 6, 5, 1, "minimin") size_c.three_way_mixed_cxbina.model_5_a(0.05, 0.1, 0.5, 6, 5, 2, "maximin") size_c.three_way_mixed_cxbina.model_5_a(0.05, 0.1, 0.5, 6, 5, 2, "minimin") size_c.three_way_mixed_cxbina.model_5_b(0.05, 0.1, 0.5, 6, 5, 2, "maximin") size_c.three_way_mixed_cxbina.model_5_b(0.05, 0.1, 0.5, 6, 5, 2, "minimin") size_c.three_way_mixed_cxbina.model_7_b(0.05, 0.1, 0.5, 6, 5, 2, "maximin") size_c.three_way_mixed_cxbina.model_7_b(0.05, 0.1, 0.5, 6, 5, 2, "minimin") size_c.three_way_nested.model_5_a(0.05, 0.1, 0.5, 6, 5, 2, "maximin") size_c.three_way_nested.model_5_a(0.05, 0.1, 0.5, 6, 5, 2, "minimin") size_c.three_way_nested.model_5_b(0.05, 0.1, 0.5, 6, 5, 2, "maximin") size_c.three_way_nested.model_5_b(0.05, 0.1, 0.5, 6, 5, 2, "minimin") size_c.three_way_nested.model_7_b(0.05, 0.1, 0.5, 6, 4, 1, "maximin") size_c.three_way_nested.model_7_b(0.05, 0.1, 0.5, 6, 4, 1, "minimin")
size_c.three_way_cross.model_3_a(0.05, 0.1, 0.5, 6, 5, 2, "maximin") size_c.three_way_cross.model_3_a(0.05, 0.1, 0.5, 6, 5, 2, "minimin") size_c.three_way_cross.model_3_axb(0.05, 0.1, 0.5, 6, 5, 2, "maximin") size_c.three_way_cross.model_3_axb(0.05, 0.1, 0.5, 6, 5, 2, "minimin") size_c.three_way_mixed_ab_in_c.model_5_a(0.05, 0.1, 0.5, 6, 5, 1, "maximin") size_c.three_way_mixed_ab_in_c.model_5_a(0.05, 0.1, 0.5, 6, 5, 1, "minimin") size_c.three_way_mixed_ab_in_c.model_5_axb(0.05, 0.1, 0.5, 6, 5, 1, "maximin") size_c.three_way_mixed_ab_in_c.model_5_axb(0.05, 0.1, 0.5, 6, 5, 1, "minimin") size_c.three_way_mixed_ab_in_c.model_5_b(0.05, 0.1, 0.5, 6, 5, 1, "maximin") size_c.three_way_mixed_ab_in_c.model_5_b(0.05, 0.1, 0.5, 6, 5, 1, "minimin") size_c.three_way_mixed_ab_in_c.model_6_b(0.05, 0.1, 0.5, 6, 5, 1, "maximin") size_c.three_way_mixed_ab_in_c.model_6_b(0.05, 0.1, 0.5, 6, 5, 1, "minimin") size_c.three_way_mixed_cxbina.model_5_a(0.05, 0.1, 0.5, 6, 5, 2, "maximin") size_c.three_way_mixed_cxbina.model_5_a(0.05, 0.1, 0.5, 6, 5, 2, "minimin") size_c.three_way_mixed_cxbina.model_5_b(0.05, 0.1, 0.5, 6, 5, 2, "maximin") size_c.three_way_mixed_cxbina.model_5_b(0.05, 0.1, 0.5, 6, 5, 2, "minimin") size_c.three_way_mixed_cxbina.model_7_b(0.05, 0.1, 0.5, 6, 5, 2, "maximin") size_c.three_way_mixed_cxbina.model_7_b(0.05, 0.1, 0.5, 6, 5, 2, "minimin") size_c.three_way_nested.model_5_a(0.05, 0.1, 0.5, 6, 5, 2, "maximin") size_c.three_way_nested.model_5_a(0.05, 0.1, 0.5, 6, 5, 2, "minimin") size_c.three_way_nested.model_5_b(0.05, 0.1, 0.5, 6, 5, 2, "maximin") size_c.three_way_nested.model_5_b(0.05, 0.1, 0.5, 6, 5, 2, "minimin") size_c.three_way_nested.model_7_b(0.05, 0.1, 0.5, 6, 4, 1, "maximin") size_c.three_way_nested.model_7_b(0.05, 0.1, 0.5, 6, 4, 1, "minimin")
Returns the optimal number of obervations per level of factor A.
size_n.one_way.model_1(alpha, beta, delta, a, cases)
size_n.one_way.model_1(alpha, beta, delta, a, cases)
alpha |
Risk of 1st kind |
beta |
Risk of 2nd kind |
delta |
The minimum difference to be detected |
a |
Number of levels of fixed factor A |
cases |
Specifies whether the |
see chapter 3 in the referenced book
Integer giving the size.
Better use size.anova
which allows a cleaner notation.
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt, Minghui Wang
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt: Optimal Experimental Design with R, Chapman and Hall/CRC, 2011
size_n.one_way.model_1(0.05,0.1, 2, 4, "maximin") size_n.one_way.model_1(0.05,0.1, 2, 4, "minimin")
size_n.one_way.model_1(0.05,0.1, 2, 4, "maximin") size_n.one_way.model_1(0.05,0.1, 2, 4, "minimin")
Returns the optimal number of obervations per level of each factor.
size_n.three_way_cross.model_1_a (alpha, beta, delta, a, b, c, cases) size_n.three_way_cross.model_1_axb (alpha, beta, delta, a, b, c, cases) size_n.three_way_cross.model_1_axbxc (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_ab_in_c.model_1_a (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_ab_in_c.model_1_b (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_ab_in_c.model_1_c (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_ab_in_c.model_3_c (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_ab_in_c.model_4_c (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_cxbina.model_1_a (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_cxbina.model_1_axc (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_cxbina.model_1_b (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_cxbina.model_1_bxc (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_cxbina.model_1_c (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_cxbina.model_3_b (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_cxbina.model_3_bxc (alpha, beta, delta, a, b, c, cases) size_n.three_way_nested.model_1_a (alpha, beta, delta, a, b, c, cases) size_n.three_way_nested.model_1_b (alpha, beta, delta, a, b, c, cases) size_n.three_way_nested.model_1_c (alpha, beta, delta, a, b, c, cases) size_n.three_way_nested.model_3_b (alpha, beta, delta, a, b, c, cases) size_n.three_way_nested.model_3_c (alpha, beta, delta, a, b, c, cases) size_n.three_way_nested.model_4_a (alpha, beta, delta, a, b, c, cases) size_n.three_way_nested.model_8_c (alpha, beta, delta, a, b, c, cases)
size_n.three_way_cross.model_1_a (alpha, beta, delta, a, b, c, cases) size_n.three_way_cross.model_1_axb (alpha, beta, delta, a, b, c, cases) size_n.three_way_cross.model_1_axbxc (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_ab_in_c.model_1_a (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_ab_in_c.model_1_b (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_ab_in_c.model_1_c (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_ab_in_c.model_3_c (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_ab_in_c.model_4_c (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_cxbina.model_1_a (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_cxbina.model_1_axc (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_cxbina.model_1_b (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_cxbina.model_1_bxc (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_cxbina.model_1_c (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_cxbina.model_3_b (alpha, beta, delta, a, b, c, cases) size_n.three_way_mixed_cxbina.model_3_bxc (alpha, beta, delta, a, b, c, cases) size_n.three_way_nested.model_1_a (alpha, beta, delta, a, b, c, cases) size_n.three_way_nested.model_1_b (alpha, beta, delta, a, b, c, cases) size_n.three_way_nested.model_1_c (alpha, beta, delta, a, b, c, cases) size_n.three_way_nested.model_3_b (alpha, beta, delta, a, b, c, cases) size_n.three_way_nested.model_3_c (alpha, beta, delta, a, b, c, cases) size_n.three_way_nested.model_4_a (alpha, beta, delta, a, b, c, cases) size_n.three_way_nested.model_8_c (alpha, beta, delta, a, b, c, cases)
alpha |
Risk of 1st kind |
beta |
Risk of 2nd kind |
delta |
The minimum difference to be detected |
a |
Number of levels of fixed factor A |
b |
Number of levels of fixed factor B |
c |
Number of levels of fixed factor C |
cases |
Specifies whether the |
see chapter 3 in the referenced book
Integer giving the size.
Better use size.anova
which allows a cleaner notation.
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt, Minghui Wang
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt: Optimal Experimental Design with R, Chapman and Hall/CRC, 2011
size_n.three_way_cross.model_1_a(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_cross.model_1_a(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_cross.model_1_axb(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_cross.model_1_axb(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_cross.model_1_axbxc(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_cross.model_1_axbxc(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_ab_in_c.model_1_a(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_ab_in_c.model_1_a(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_ab_in_c.model_1_axb(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_ab_in_c.model_1_axb(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_ab_in_c.model_1_b(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_ab_in_c.model_1_b(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_ab_in_c.model_1_c(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_ab_in_c.model_1_c(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_ab_in_c.model_3_c(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_ab_in_c.model_3_c(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_ab_in_c.model_4_c(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_ab_in_c.model_4_c(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_cxbina.model_1_a(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_cxbina.model_1_a(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_cxbina.model_1_axc(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_cxbina.model_1_axc(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_cxbina.model_1_b(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_cxbina.model_1_b(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_cxbina.model_1_bxc(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_cxbina.model_1_bxc(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_cxbina.model_1_c(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_cxbina.model_1_c(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_cxbina.model_3_b(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_cxbina.model_3_b(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_cxbina.model_3_bxc (0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_cxbina.model_3_bxc (0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_nested.model_1_a(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_nested.model_1_a(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_nested.model_1_b(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_nested.model_1_b(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_nested.model_1_c(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_nested.model_1_c(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_nested.model_3_b(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_nested.model_3_b(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_nested.model_3_c(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_nested.model_3_c(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_nested.model_4_c(0.05, 0.1, 0.5, 6, NA, 4, "maximin") size_n.three_way_nested.model_4_c(0.05, 0.1, 0.5, 6, NA, 4, "minimin") size_n.three_way_nested.model_8_c(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_nested.model_8_c(0.05, 0.1, 0.5, 6, 5, 4, "minimin")
size_n.three_way_cross.model_1_a(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_cross.model_1_a(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_cross.model_1_axb(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_cross.model_1_axb(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_cross.model_1_axbxc(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_cross.model_1_axbxc(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_ab_in_c.model_1_a(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_ab_in_c.model_1_a(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_ab_in_c.model_1_axb(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_ab_in_c.model_1_axb(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_ab_in_c.model_1_b(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_ab_in_c.model_1_b(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_ab_in_c.model_1_c(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_ab_in_c.model_1_c(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_ab_in_c.model_3_c(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_ab_in_c.model_3_c(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_ab_in_c.model_4_c(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_ab_in_c.model_4_c(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_cxbina.model_1_a(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_cxbina.model_1_a(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_cxbina.model_1_axc(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_cxbina.model_1_axc(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_cxbina.model_1_b(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_cxbina.model_1_b(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_cxbina.model_1_bxc(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_cxbina.model_1_bxc(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_cxbina.model_1_c(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_cxbina.model_1_c(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_cxbina.model_3_b(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_cxbina.model_3_b(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_mixed_cxbina.model_3_bxc (0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_mixed_cxbina.model_3_bxc (0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_nested.model_1_a(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_nested.model_1_a(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_nested.model_1_b(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_nested.model_1_b(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_nested.model_1_c(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_nested.model_1_c(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_nested.model_3_b(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_nested.model_3_b(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_nested.model_3_c(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_nested.model_3_c(0.05, 0.1, 0.5, 6, 5, 4, "minimin") size_n.three_way_nested.model_4_c(0.05, 0.1, 0.5, 6, NA, 4, "maximin") size_n.three_way_nested.model_4_c(0.05, 0.1, 0.5, 6, NA, 4, "minimin") size_n.three_way_nested.model_8_c(0.05, 0.1, 0.5, 6, 5, 4, "maximin") size_n.three_way_nested.model_8_c(0.05, 0.1, 0.5, 6, 5, 4, "minimin")
Returns the optimal number of obervations per level of factor A.
size_n.two_way_cross.model_1_a(alpha, beta, delta, a, b, cases) size_n.two_way_cross.model_1_axb(alpha, beta, delta, a, b, cases) size_n.two_way_nested.model_1_test_factor_a(alpha, beta, delta, a, b, cases) size_n.two_way_nested.model_1_test_factor_b(alpha, beta, delta, a, b, cases) size_n.two_way_nested.a_random_b_fixed_b(alpha, beta, delta, a, b, cases)
size_n.two_way_cross.model_1_a(alpha, beta, delta, a, b, cases) size_n.two_way_cross.model_1_axb(alpha, beta, delta, a, b, cases) size_n.two_way_nested.model_1_test_factor_a(alpha, beta, delta, a, b, cases) size_n.two_way_nested.model_1_test_factor_b(alpha, beta, delta, a, b, cases) size_n.two_way_nested.a_random_b_fixed_b(alpha, beta, delta, a, b, cases)
alpha |
Risk of 1st kind |
beta |
Risk of 2nd kind |
delta |
The minimum difference to be detected |
a |
Number of levels of fixed factor A |
b |
Number of levels of fixed factor B |
cases |
Specifies whether the |
see chapter 3 in the referenced book
Integer giving the size.
Better use size.anova
which allows a cleaner notation.
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt, Minghui Wang
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt: Optimal Experimental Design with R, Chapman and Hall/CRC, 2011
size_n.two_way_cross.model_1_a(0.05,0.1, 1, 6, 4, "maximin") size_n.two_way_cross.model_1_a(0.05,0.1, 1, 6, 4, "minimin") size_n.two_way_cross.model_1_axb(0.05,0.1, 1, 6, 4, "maximin") size_n.two_way_cross.model_1_axb(0.05,0.1, 1, 6, 4, "minimin") size_n.two_way_nested.model_1_test_factor_a(0.05, 0.1, 1, 6, 4, "maximin") size_n.two_way_nested.model_1_test_factor_a(0.05, 0.1, 1, 6, 4, "minimin") size_n.two_way_nested.a_random_b_fixed_b(0.05, 0.1, 1, 2, 10, "maximin") size_n.two_way_nested.a_random_b_fixed_b(0.05, 0.1, 1, 2, 10, "minimin") size_n.two_way_nested.a_random_b_fixed_b(0.05, 0.1, 1, 3, 10, "maximin") size_n.two_way_nested.a_random_b_fixed_b(0.05, 0.1, 1, 3, 10, "minimin") size_n.two_way_nested.a_random_b_fixed_b(0.05, 0.1, 1, 10, 10, "maximin") size_n.two_way_nested.a_random_b_fixed_b(0.05, 0.1, 1, 10, 10, "minimin")
size_n.two_way_cross.model_1_a(0.05,0.1, 1, 6, 4, "maximin") size_n.two_way_cross.model_1_a(0.05,0.1, 1, 6, 4, "minimin") size_n.two_way_cross.model_1_axb(0.05,0.1, 1, 6, 4, "maximin") size_n.two_way_cross.model_1_axb(0.05,0.1, 1, 6, 4, "minimin") size_n.two_way_nested.model_1_test_factor_a(0.05, 0.1, 1, 6, 4, "maximin") size_n.two_way_nested.model_1_test_factor_a(0.05, 0.1, 1, 6, 4, "minimin") size_n.two_way_nested.a_random_b_fixed_b(0.05, 0.1, 1, 2, 10, "maximin") size_n.two_way_nested.a_random_b_fixed_b(0.05, 0.1, 1, 2, 10, "minimin") size_n.two_way_nested.a_random_b_fixed_b(0.05, 0.1, 1, 3, 10, "maximin") size_n.two_way_nested.a_random_b_fixed_b(0.05, 0.1, 1, 3, 10, "minimin") size_n.two_way_nested.a_random_b_fixed_b(0.05, 0.1, 1, 10, 10, "maximin") size_n.two_way_nested.a_random_b_fixed_b(0.05, 0.1, 1, 10, 10, "minimin")
This function provides access to several functions returning the optimal number of levels and / or observations in different types of One-Way, Two-Way and Three-Way ANOVA.
size.anova(model, hypothesis = "", assumption = "", a = NULL, b = NULL, c = NULL, n = NULL, alpha, beta, delta, cases)
size.anova(model, hypothesis = "", assumption = "", a = NULL, b = NULL, c = NULL, n = NULL, alpha, beta, delta, cases)
model |
A character string describing the model, allowed characters are
Examples: One-Way fixed: |
hypothesis |
Character string describiung Null hypothesis, can be omitted in
most cases if it is clear that a
test for no effects of factor A is performed, Other possibilities: |
assumption |
Character string. A few functions need an assumption on sigma, like
|
a |
Number of levels of fixed factor A |
b |
Number of levels of fixed factor B |
c |
Number of levels of fixed factor C |
n |
Number of Observations |
alpha |
Risk of 1st kind |
beta |
Risk of 2nd kind |
delta |
The minimum difference to be detected |
cases |
Specifies whether the |
see chapter 3 in the referenced book
named integer giving the desired size(s)
Depending on the selected model and hypothesis omit one or two of the
sizes a
, b
, c
, n
. The function then tries
to get its optimal value.
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt, Minghui Wang
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt: Optimal Experimental Design with R, Chapman and Hall/CRC, 2011
size.anova(model="a",a=4, alpha=0.05,beta=0.1, delta=2, case="maximin") size.anova(model="a",a=4, alpha=0.05,beta=0.1, delta=2, case="minimin") size.anova(model="axb", hypothesis="a", a=6, b=4, alpha=0.05,beta=0.1, delta=1, cases="maximin") size.anova(model="axb", hypothesis="a", a=6, b=4, alpha=0.05,beta=0.1, delta=1, cases="maximin") size.anova(model="axb", hypothesis="axb", a=6, b=4, alpha=0.05,beta=0.1, delta=1, cases="minimin") size.anova(model="axb", hypothesis="axb", a=6, b=4, alpha=0.05,beta=0.1, delta=1, cases="minimin") size.anova(model="axBxC",hypothesis="a", assumption="sigma_AC=0,b=c",a=6,n=2, alpha=0.05, beta=0.1, delta=0.5, cases="maximin") size.anova(model="axBxC",hypothesis="a", assumption="sigma_AC=0,b=c",a=6,n=2, alpha=0.05, beta=0.1, delta=0.5, cases="minimin") size.anova(model="a>B>c", hypothesis="c",a=6, b=2, c=4, alpha=0.05, beta=0.1, delta=0.5, case="maximin") size.anova(model="a>B>c", hypothesis="c",a=6, b=20, c=4, alpha=0.05, beta=0.1, delta=0.5, case="maximin") size.anova(model="a>B>c", hypothesis="c",a=6, b=NA, c=4, alpha=0.05, beta=0.1, delta=0.5, case="maximin") size.anova(model="(axb)>c", hypothesis="a",a=6, b=5, c=4, alpha=0.05, beta=0.1, delta=0.5, case="maximin") size.anova(model="(axb)>c", hypothesis="a",a=6, b=5, c=4, alpha=0.05, beta=0.1, delta=0.5, case="minimin") size.anova(model="(axb)>c", hypothesis="a",a=6, b=5, c=4, alpha=0.05, beta=0.1, delta=0.5, case="maximin") size.anova(model="(axb)>c", hypothesis="a",a=6, b=5, c=4, alpha=0.05, beta=0.1, delta=0.5, case="minimin")
size.anova(model="a",a=4, alpha=0.05,beta=0.1, delta=2, case="maximin") size.anova(model="a",a=4, alpha=0.05,beta=0.1, delta=2, case="minimin") size.anova(model="axb", hypothesis="a", a=6, b=4, alpha=0.05,beta=0.1, delta=1, cases="maximin") size.anova(model="axb", hypothesis="a", a=6, b=4, alpha=0.05,beta=0.1, delta=1, cases="maximin") size.anova(model="axb", hypothesis="axb", a=6, b=4, alpha=0.05,beta=0.1, delta=1, cases="minimin") size.anova(model="axb", hypothesis="axb", a=6, b=4, alpha=0.05,beta=0.1, delta=1, cases="minimin") size.anova(model="axBxC",hypothesis="a", assumption="sigma_AC=0,b=c",a=6,n=2, alpha=0.05, beta=0.1, delta=0.5, cases="maximin") size.anova(model="axBxC",hypothesis="a", assumption="sigma_AC=0,b=c",a=6,n=2, alpha=0.05, beta=0.1, delta=0.5, cases="minimin") size.anova(model="a>B>c", hypothesis="c",a=6, b=2, c=4, alpha=0.05, beta=0.1, delta=0.5, case="maximin") size.anova(model="a>B>c", hypothesis="c",a=6, b=20, c=4, alpha=0.05, beta=0.1, delta=0.5, case="maximin") size.anova(model="a>B>c", hypothesis="c",a=6, b=NA, c=4, alpha=0.05, beta=0.1, delta=0.5, case="maximin") size.anova(model="(axb)>c", hypothesis="a",a=6, b=5, c=4, alpha=0.05, beta=0.1, delta=0.5, case="maximin") size.anova(model="(axb)>c", hypothesis="a",a=6, b=5, c=4, alpha=0.05, beta=0.1, delta=0.5, case="minimin") size.anova(model="(axb)>c", hypothesis="a",a=6, b=5, c=4, alpha=0.05, beta=0.1, delta=0.5, case="maximin") size.anova(model="(axb)>c", hypothesis="a",a=6, b=5, c=4, alpha=0.05, beta=0.1, delta=0.5, case="minimin")
An triangular.test
object is created with
triangular.test.norm
or triangular.test.prop
A triangular.test
object is a list of
x |
data for group 1 |
y |
data for group 2 |
n |
size of group 1 |
m |
size of group 2 |
alpha |
risk of 1st kind |
beta |
risk of 2nd kind |
dist |
character, either |
sample |
character, |
kind |
character, |
p0 |
parameter describing the Null hypothesis, see |
p1 |
... |
p2 |
... |
mu0 |
parameter describing the Null hypothesis, see |
mu1 |
... |
mu2 |
... |
result |
character, outcome of the test, |
step |
total number of steps |
and some more components for internal use.
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt: Optimal Experimental Design with R, Chapman and Hall/CRC, 2011
triangular.test.norm
, triangular.test.prop
Performs a sequential test, compares means of two normally distributed groups.
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)
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)
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. |
One-sample:
This function performs a one- or two-sided sequential Test for
versus
, if
mu2
> mu1
(one-sided)
, if
mu2
< mu1
(one-sided)
or
,
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
in both groups versus
, if
mu2
> mu1
(one-sided)
, if
mu2
< mu1
(one-sided)
or
,
if
mu2
> mu1
and mu0
<
mu1
(two-sided, possibly unsymmetric)
An object of class triangular.test
, to be used for
later update steps.
A two-sided test may be specified by supplying both mu1
and
mu2
, even unsymmetric if needed.
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt: Optimal Experimental Design with R, Chapman and Hall/CRC, 2011
triangular.test
, triangular.test.prop
, update.triangular.test
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])
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])
Performs a sequential test, compares probabilities in two groups.
triangular.test.prop(x, y = NULL, p0 = NULL, p1 = NULL, p2 = NULL, alpha = 0.05, beta = 0.1, delta = NULL, plot = TRUE)
triangular.test.prop(x, y = NULL, p0 = NULL, p1 = NULL, p2 = NULL, alpha = 0.05, beta = 0.1, delta = NULL, plot = TRUE)
x |
initial data for group |
y |
initial data for group |
p0 |
specifies Null and alternative hypothesis, see Details below. |
p1 |
specifies Null and alternative hypothesis, see Details below. |
p2 |
specifies Null and alternative hypothesis, see Details below. |
alpha |
Risk of 1st kind |
beta |
Risk of 2nd kind |
plot |
logical, indicates whether a initial plot should be generated. |
delta |
The minimum difference to be detected, alternative way to
specify |
One-sample:
This function performs a one- or two-sided sequential Test for
versus
, if
p2
> p1
(one-sided)
, if
p2
< p1
(one-sided)
or
,
if
p2
> p1
and p0
<
p1
(two-sided, possibly unsymmetric)
Two-sample:
This function performs a one- or two-sided sequential Test for equal
proportions
versus
, if
p2
> p1
(one-sided)
, if
p2
< p1
(one-sided)
or
,
if
p2
> p1
and p0
<
p1
(two-sided, possibly unsymmetric)
An object of class triangular.test
, to be used for
later update steps.
A two-sided test may be specified by supplying both p1
and
p2
, even unsymmetric if needed.
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt: Optimal Experimental Design with R, Chapman and Hall/CRC, 2011
triangular.test
, triangular.test.norm
, update.triangular.test
data(heights) attach(heights) male180 <- as.integer(male>180) female164 <- as.integer(female>164) sum(male180)/length(male180) tt <- triangular.test.prop(x=female164[1:3], y=male180[1:3], p1=0.4,p2=0.8,p0=0.1, alpha=0.05, beta=0.2) tt <- update(tt,x=female164[4]) tt <- update(tt,y=male180[4]) tt <- update(tt,x=female164[5]) sum(female164)/length(female164)
data(heights) attach(heights) male180 <- as.integer(male>180) female164 <- as.integer(female>164) sum(male180)/length(male180) tt <- triangular.test.prop(x=female164[1:3], y=male180[1:3], p1=0.4,p2=0.8,p0=0.1, alpha=0.05, beta=0.2) tt <- update(tt,x=female164[4]) tt <- update(tt,y=male180[4]) tt <- update(tt,x=female164[5]) sum(female164)/length(female164)
Updates a triangular.test
object and executes one or more steps
in the sequence of tests.
## S3 method for class 'triangular.test' update(object, x=NULL, y=NULL, initial=FALSE, plot="last", recursive=FALSE, ...)
## S3 method for class 'triangular.test' update(object, x=NULL, y=NULL, initial=FALSE, plot="last", recursive=FALSE, ...)
object |
|
x |
data for group 1 |
y |
data for group 2 |
initial |
logical, used internally for creating a
|
plot |
character, |
recursive |
logical, used internally to decide wether a plot should be generated (will be omitted if recursively called) |
... |
additional parameters for |
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt
Dieter Rasch, Juergen Pilz, L.R. Verdooren, Albrecht Gebhardt: Optimal Experimental Design with R, Chapman and Hall/CRC, 2011
triangular.test.norm
, triangular.test.prop