Learn R Programming

qualityTools (version 1.55)

effectPlot: Main Effect Plots

Description

A main effect plot is created for designs of type taguchiDesign and facDesign.

Usage

effectPlot(object, factors, fun = mean, response = NULL, single = FALSE, points = FALSE, classic = FALSE, axes = TRUE, lty, xlab, ylab, main, ylim, ...)

Arguments

object
needs to be an object of class facDesign or taguchiDesign.
factors
for which factor is the effectPlot to be created.
fun
a function for the construction of the effectPlot such as mean, median,etc. By default fun is set to mean.
response
response variable. If the response data frame of fdo consists of more then one responses, this variable can be used to choose just one column of the response data frame. response needs to be an object of class character with length of ‘1’. It needs to be the same character as the name of the response in the response data frame that should be plotted. By default response is set to ‘NULL’.
single
logical value. If ‘TRUE’ device region can be set up using for instance par(mfrow = c(2,2)). By default single is set to ‘FALSE’.
points
logical value. If ‘TRUE’ points are shown in addition to values out of fun. By default points is set to ‘FALSE’.
axes
logical value indicating wheter the axes should be drawn or not. ‘TRUE’ by default.
classic
logical value. ‘TRUE’ creates an effectPlot as depicted in most textbooks. By default classic is set to ‘FALSE’.
lty
numerical value which specifies the line type used.
xlab
a title for the x axis: title.
ylab
a title for the y axis: title.
main
an overall title for the plot: see title.
ylim
vector giving the range of the y-axis.
...
Arguments to be passed to methods, such as graphical parameters (see par).

Details

effectPlot uses an altered version of the base function interaction.plot to draw each effectPlot.

See Also

interactionPlot paretoPlot snPlot facDesign response normalPlot http://www.r-qualitytools.org/html/Improve.html

Examples

Run this code
#effectPlot for a 2^k factorial design
fdo = facDesign(k = 3)
#set response with generic response function
response(fdo) = rnorm(8)  
effectPlot(fdo)

#effectPlot for a taguchiDesign
tdo = taguchiDesign("L9_3")
response(tdo) = rnorm(9)
effectPlot(tdo, points = TRUE, col = 2, pch = 16, lty = 3)

Run the code above in your browser using DataLab