The plot method for class design objects; other methods are part of a separate help page.
data frame of S3 class
a character vector of names of numeric variables in
Specification of selected factors through option
a number between 0 and 1 indicating which proportion of
worst cases to plot in case
further arguments to functions
Items of class
design are data frames with attributes,
that have been created for conducting experiments. Apart from the plot method
documented here, separate files document the methods
The method for
plot calls the method available in package graphics
plot.design) wherever this makes sense (
x not of class
x of class
design but not following the class
defined in package DoE.base,
x a design with all factors being R-factors and at least one response available).
plot.design from package graphics is not
an adequate choice for designs without responses or designs with experimental factors
that are not R-factors.
For designs with all factors being R-factors and no response defined (e.g. a freshly-created design from function
plot.design creates a mosaic plot of
the frequency table of the design, which may be quite useful to understand the structure
for designs with relatively few factors (cf. example below; function
mosaic for this purpose).
For designs with at least one experimental factor that is not an R-factor, function
plot.design calls function
plot.data.frame in order
to create a scatter plot matrix.
Currently, there is no good method for plotting designs with mixed qualitative and quantitative factors.
select is set to
or a list with a numeric vector as its first element and one of these as the second element,
select as any of
response variables are ignored, and mosaic plots are created.
These requests usually ask for several plots; note that the plots are created one after the other; with an interactive graphics device, the default is that they overwrite each other after a user confirmation for the next plot, which allows users to visually inspect them one at a time; under Windows, the plotting series can be aborted using the
With non-interactive graphics devices,
the default is
ask=FALSE (e.g. for storing all the plots
in a multi-page file, see examples).
select is any of
mosaic plots of all pairs, triples or quadruples of factors are created as specified.
is interesting for non-orthogonal designs only, e.g. ones created by function
select is set to
the worst case tuples to be displayed are selected by function
plot method is called for its side effects and returns
The package is currently subject to intensive development; most key functionality is now included. Some changes to input and output structures may still occur.
Groemping, U (2014) Mosaic plots are useful for visualizing low order projections of factorial designs. To appear in The American Statistician http://www.tandfonline.com/action/showAxaArticles?journalCode=utas20.
See also the following functions known to produce objects of class
plot.design from package graphics;
a method for function
lm is described in the separate help file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
#### Examples for plotting designs oa12 <- oa.design(nlevels=c(2,2,6)) ## plotting a design without response (uses function mosaic from package vcd) plot(oa12) ## equivalent to mosaic(~A+B+C, oa12) ## alternative order: mosaic(~C+A+B, oa12) plot(oa12, select=c(3,1,2)) ## using the select function: the plots show that the projection for factors ## C, D and E (columns 3, 14 and 15 of the array) is a full factorial, ## while A, D and E (columns 1, 14, and 15 of the array) do not occur in ## all combinations plan <- oa.design(L188.8.131.52.1.4.1,nlevels=c(2,2,2,3,4)) plot(plan, select=c("E","D","A")) plot(plan, select=c("E","D","C")) ## Not run: plot(plan, select="all3") plot(plan, select=list(c(1,3,4,5), "all3")) ## use the specialist version of option sub plot(plan, select=list(c(1,3,4,5), "all3"), sub="A") ## create a file with mosaic plots of all 3-factor projections pdf(file="exampleplots.pdf") plot(plan, select="all3", main="Design from L184.108.40.206.1.4.1 in default column order)") plot(plan, select="worst", selprop=0.3, sub="A") dev.off() ## the file exampleplots.pdf is now available within the current working ## directory ## End(Not run) ## plotting a design with response y=rnorm(12) plot(oa12, y) ## plot design with a response included oa12.r <- add.response(oa12,y) plot(oa12.r) ## plotting a numeric design (with or without response, ## does not make statistical sense here, for demo only) noa12 <- qua.design(oa12, quantitative="all") plot(noa12, y, main="Scatter Plot Matrix")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.