rand.design.azais {crossdes} | R Documentation |
The function performs a simulation study to assess whether a randomization procedure proposed by Azais (1987) validates the simple block model for a given design. The results are stored to a file.
rand.design.azais(design, dat, tau1, rho, n, where)
design |
A matrix with b rows and k columns representing the experimental design. Treatments are numbered 1,...,trt. |
dat |
A numerical vector with bk elements giving the data to be used for the simulation study.
The first k values of dat correspond to the first row of the design,
the next k values correspond to the second row etc. |
tau1 |
The value of the main effect of treatment 1. |
rho |
The value that is used for the carryover (residual) effects of treatments 1 and 2. |
n |
The number of permutations in the simulation study. |
where |
Path that gives the location of the simulation results. |
The simulation study proceeds as follows:
For every iteration, treatment labels and rows of the design are randomized. Then the treatment order in each row
is permuted cyclically. Then the elementary contrast
tau_1 - tau_trt is estimated and the estimate of the variance of this contrast is computed.
These computations are done for each of six situations:
1) There are no direct or residual effects of treatments.
2) There is a direct effect of treatment 1.
In 3) and 4), a residual effect of treatment 2 is added while
in 5) and 6), a residual effect of treatment 1 is added.
The estimates are then stored to where
.
There is no value returned. The results are stored in a file.
You need to call analyze.rand
to display and interpret the results.
rand.design.azais
just performs the simulation study.
Oliver Sailer sailer@statistik.uni-dortmund.de
Azais, J.M. (1987): Design of experiments for studying intergenotypic competition. Journal of the Royal Statistical Society B 49, 334-345.
Bailey, R.A. and Rowley, C.A. (1987): Valid randomization. Proceedings of the Royal Society London A 410, 105-124.
Kunert, J. and Sailer, O. (2006): On nearly balanced designs for sensory trials. Food Quality and Preference 17, 219-227.
## Not run: # First create a data set to analyze: d <- matrix(c(1,1,1,2,2,3,4,4,3,4,2,3),ncol=3) rand.design.azais( d, rnorm(12), -1, 1, 1000, "D:\mytest.txt" ) # Now do the analysis: analyze.rand( "D:\mytest.txt", fig=TRUE, ref=TRUE, refval=c(0, -1, 0, -1, -.5, -1.5) ) ## End(Not run)