Learn R Programming

qualityTools (version 1.55)

interactionPlot: interactionPlot

Description

Display effects of an object of class facDesign in a line plot.

Usage

interactionPlot(fdo, y = NULL, response = NULL, fun = mean, main, col = 1:2, ...)

Arguments

fdo
needs to be an object of class facDesign.
fun
function to use for the calculation of the interactions, as mean,median,etc.
col
vector of colors for the plot. Single colors can be given as character strings or numeric values.
y
if fdo is a vector, interactionPlot() defaults to interaction.plot from package stats if y is a vector too.
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.
main
an overall title for the plot: see title.
...
further graphical parameters: see par.

Value

Details

interactionPlot() displays interactions for an object of class facDesign (i.e. 2^k full or 2^k-p fractional factorial design). Parts of the original interactionPlot were integrated.

See Also

factors fracDesign http://www.r-qualitytools.org/html/Improve.html

Examples

Run this code
#NA in response column and 2 replicates per factor combination
vp = fracDesign(k = 3, replicates = 2) 
#generate some data                            
y = 4*vp[,1] -7*vp[,2] + 2*vp[,2]*vp[,1] + 0.2*vp[,3] + rnorm(16)  
response(vp) = y
#show effects and interactions (nothing significant expected)
interactionPlot(vp)                                                

Run the code above in your browser using DataLab