Learn R Programming

FrF2 (version 2.1)

cubePlot: Cube plot for three-factor-effects

Description

A cube plot for the combined effect of three factors is produced (function cubePlot). Functions cubedraw, cubecorners, cubelabel and myscatterplot3d are not intended for users.

Usage

cubePlot(obj, eff1, eff2, eff3, main=paste("Cube plot for",respnam),
    cex.title=1.5,cex.lab=par("cex.lab"), cex.ax=par("cex.axis"),  
    cex.clab=1.2, size=0.3, round=NULL,
    abbrev=4,y.margin.add=-0.2, modeled=TRUE)

Arguments

obj

a vector of response values to be analyzed

OR

a linear model object with 2-level factors or numerical 2-level variables (CAUTION: numerical x-variable have to be coded as -1 and +1 only!); the structure must be such that effects are either fully aliased or orthogonal, like in a fractional factorial 2-level design

eff1

cf. eff3

eff2

cf. eff3

eff3

effects to be included in the cube plot (x-, y-, z-direction), EITHER vectors of equal length (two-level factors or numerical with the two values -1 and 1) OR variable names of main effects within the obj linear model object (character strings)

main

title for the plot, respnam is the name of the response variable as determined from the call

cex.title

multiplier for size of overall title (cex.main is multiplied with this factor)

cex.ax

size of axis tick marks, defaults to cex.axis-parameter

cex.lab

size of axis labels

cex.clab

size of corner labels

size

size of cube corners

round

optional rounding of corner labels (digits argument for function round, e.g. round=0 for integers, round=-1 for multiples of 10, round=1 for 1 decimal place

abbrev

number of characters shown for factor levels

y.margin.add

adjustment parameter for placement of y-axis labeling

modeled

TRUE (default: show modeled means; FALSE: show averages

NOTE: Even when showing modeled means, there also appears to be a three-factor-interaction, if the model contains an effect that is aliased with this interaction!

Value

cubePlot is used for its side effects only.

Details

cubePlot produces a cube plot of the modeled means or averages of all combinations for three factors. The other functions are internal and are called by cubePlot. myscatterplot3d is a modified version of scatterplot3d, made more suitable for this situation.

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