IAPlot {FrF2}R Documentation

Main Effects and Interaction Plots

Description

Main effects plots and interaction plots are produced. The other documented functions are not intended for users.

Usage

MEPlot(obj, ...)
## S3 method for class 'design':
MEPlot(obj, ..., response = NULL)
## Default S3 method:
MEPlot(obj, main = paste("Main effects plot for", respnam), 
    pch = 15, cex.xax = par("cex.axis"), cex.yax = cex.xax, mgp.ylab = 4, 
    cex.title = 1.5, cex.main = par("cex.main"), 
    lwd = par("lwd"), abbrev = 3, select = NULL, ...)

IAPlot(obj, ...)
## S3 method for class 'design':
IAPlot(obj, ..., response = NULL)
## Default S3 method:
IAPlot(obj, main = paste("Interaction plot matrix for", respnam), 
    pch = c(15, 17), cex.lab = par("cex.lab"), cex = par("cex"), 
    cex.xax = par("cex.axis"), cex.yax = cex.xax, cex.title = 1.5, 
    lwd = par("lwd"), abbrev = 4, select = NULL, show.alias = FALSE, ...)
         
intfind(i, j, mat)

check(obj)

remodel(obj)

Arguments

obj an experimental design of class design with the type element of the design.info attribute containing “FrF2” or “pb”
OR
a linear model object with 2-level factors or numerical 2-level variables;
the structure must be such that effects are either fully aliased or orthogonal, like in a regular fractional factorial 2-level design;
note that IAPlot currently requires the response in obj to be a pre-defined variable and not a calculated quantity
... further arguments to be passed to the default function;
... in the default method are not used, they have been added because of formal requirements only
response character string that specifies response variable to be used, must be an element of response.names(obj); if NULL, the first response from response.names(obj) is used
main overall title for the plot assembly
pch Plot symbol number MEPlot, or vector of two plot symbol numbers for the lower and higher level of the trace factor iap
cex.xax size of x-axis annotation, defaults to cex.axis-parameter
cex.yax size of y-axis annotation, defaults to cex.xax
mgp.ylab horizontal placement of label of vertical axis in MEPlot
cex.title multiplier for size of overall title (cex.main is multiplied with this factor)
cex.main size of individual plot titles in MEPlot
cex.lab Size of variable names in diagonal panels of interaction plots produced by IAPlot.
cex size of plot symbols in interaction plots
lwd line width for plot lines and axes
abbrev number of characters shown for factor levels
select vector with position numbers of the main effects to be displayed;
default: all main effects; the default implies the full interaction plot matrix for IAPlot.
For IAPlot, the full interaction plot matrix for the selected factors is displayed. Of course, at least two factors must be selected. Furthermore, the linear model obj must at least contain one interaction term among the selected variables. For interactions that do not occur in the linear model, not plot is shown. An interaction plot matrix of data means can be obtained by specifying the model with all possible 2-factor interactions (e.g. formula y~(.)^2 for a regular 2-level fractional factorial, for which y is the only response and all other variables are 2-level factors).
show.alias if TRUE, the interaction plot shows the number of the list entry from aliases(obj)$aliases (cf. aliases) in order to support immediate diagnosis of which depicted interaction may be due to other than the shown effect because of aliasing
i integer, for internal use only
j integer, for internal use only
mat matrix, for internal use only

Details

For functions MEPlot or IAPlot, if obj is a design with at least one response variable rather than a linear model fit, the lm-method for class design is applied to it with the required degree (1 or 2), and the default method for the respective function is afterwards applied to the resulting linear model.

MEPlot
produces plots of all main effects in the model, or selected ones if select is specified
IAPlot
produces plots of all interaction effects in the model, or selected ones if select is specified
intfind
is an internal function not directly useful for users
check
is an internal function for checking whether the model complies with assumptions (fractional factorial of 2-level factors with full or no aliasing, not partial aliasing; this implies that Plackett-Burman designs with partial aliasing of 2-factor interactions give an OK (=TRUE) in check for pure main effects models only.)
remodel
is an internal function that redoes factor values into -1 and 1 coding, regardless of the contrasts that have been used for the original factors; numerical data are transformed by subtracting the mean and dividing by half the range (max-min), which also transforms them to -1 and 1 coding in the 2-level case (and leads to an error otherwise)

Value

MEPlot and IAPlot are used for their side effects only.
The internal function check is used within other functions for checking whether the model is a fractional factorial with 2-level factors and no partial aliasing, as requested for the package to work. It is applied to remodeled objects only and returns a logical. If the returned value is FALSE, the calling function fails.
The internal function intfind returns an integer (length 1 or 0). It is not useful for users.
The internal function remodel is applied to a linear model object and returns a list of two components:

model is the redone model with x-variables recoded to numeric -1 and 1 notation and aov objects made into “pure” lm objects
labs is a list preserving the level information from original factors (levels are minus and plus for numerical variables)

Author(s)

Ulrike Groemping

References

Box G. E. P, Hunter, W. C. and Hunter, J. S. (2005) Statistics for Experimenters, 2nd edition. New York: Wiley.

See Also

FrF2-package for examples


[Package FrF2 version 1.0-5 Index]