wirePlot3: function to create a ternary plot (3D wire plot) for an...

Description Usage Arguments Value Note Author(s) References See Also Examples

Description

This function creates a ternary plot for mixture designs (i.e. object of class mixDesign).

Usage

1
2
wirePlot3(x, y, z, response, data = NULL, main, xlab, ylab, zlab, 
          form = "linear", phi, theta, col = 1, steps, factors)

Arguments

x

factor 1 of the mixDesign object.

y

factor 2 of the mixDesign object.

z

factor 3 of the mixDesign object.

response

the response of the mixDesign object.

data

the mixDesign object from which x,y,z and the response are taken.

main

giving an overall title for the plot: see title.

xlab

giving a title for the x axis : see title.

ylab

giving a title for the y axis : see title.

zlab

giving a title for the z axis : see title.

form

a character string or a formula with the syntax “y ~ A + B +C”.
If form is a character string it has to be one out of the following:

  • “linear”

  • “quadratic”

  • “fullCubic”

  • “specialCubic”

How the form influences the output is described in the reference listed below.
By default form is set as “linear”.

phi

numerical value specifying the angle (in degree) through which the plot is rotated about an imagined horizontal line.
By default phi is set as ‘30’.

theta

numerical value specifying the angle (in degree) through which the plot is rotated about an imagined vertical line.
By default phi is set as ‘30’.

col

a predefined (1, 2, 3 or 4) or self defined colorRampPalette.

steps

resolution of the plot (number of rows for the square matrix), also number of grid points per factor.
By default steps = 25.

factors

list of factors for categorizing with setting in case there are more than 3 factors (not yet implemented).

Value

wirPlot3 returns an invisible matrix containing the response values as NA's and numerics.

Note

This method is still under construction!!
For an example in context which shows the usage of the function wirePlot3() to an object of class mixDesign, please read the vignette for the package qualityTools at http://www.r-qualitytools.org/html/Improve.html.

Author(s)

Thomas Roth thomas.roth@tu-berlin.de

References

See Also

contourPlot3
http://www.r-qualitytools.org/html/Improve.html

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#yarn elongation example p.564 Response Surface Methodology
mdo = mixDesign(3,2, center = FALSE, axial = FALSE, randomize = FALSE, 
                replicates  = c(1,1,2,3))
names(mdo) = c("polyethylene", "polystyrene", "polypropylene")
units(mdo) = "percent"
elongation = c(11.0, 12.4, 15.0, 14.8, 16.1, 17.7, 16.4, 16.6, 8.8, 10.0, 10.0,
               9.7, 11.8, 16.8, 16.0)
response(mdo) = elongation

dev.new(14,14); par(mfrow = c(2,2))
wirePlot3(A, B, C, elongation, data = mdo, form = "linear")
wirePlot3(A, B, C, elongation, data = mdo, form = "quadratic", col = 2)
wirePlot3(A, B, C, elongation, data = mdo, 
          form = "elongation ~ I(A^2) - B:A + I(C^2)", col = 3)
wirePlot3(A, B, C, elongation, data = mdo, form = "quadratic", 
          col = colorRampPalette(c("yellow", "white", "red")))

Example output

Loading required package: Rsolnp
Loading required package: MASS

Attaching package: 'qualityTools'

The following object is masked from 'package:stats':

    sigma

Warning messages:
1: In `[<-`(`*tmp*`, i, value = <S4 object of class "doeFactor">) :
  implicit list embedding of S4 objects is deprecated
2: In `[<-`(`*tmp*`, i, value = <S4 object of class "doeFactor">) :
  implicit list embedding of S4 objects is deprecated
3: In `[<-`(`*tmp*`, i, value = <S4 object of class "doeFactor">) :
  implicit list embedding of S4 objects is deprecated
[1] "elongation"

qualityTools documentation built on May 2, 2019, 10:21 a.m.