fits-methods: Get and set methods

Description Usage Arguments Methods Author(s) See Also Examples

Description

Set or get the fits (i.e. linear model) for each response of a factorial design. The fit is stored in the facDesign object. Setting fits is required for optimization of multiple responses.

Usage

1
2
3
4
## S4 method for signature 'facDesign'
fits(x)
## S4 replacement method for signature 'facDesign'
fits(x) <- value

Arguments

x

an object of class facDesign.

value

an object of class lm.

Methods

signature(objectc = "facDesign")

Get and set the fits for an object of class facDesign.

Author(s)

Thomas Roth thomas.roth@tu-berlin.de

See Also

desires
desirability
rsmDesign
http://www.r-qualitytools.org/html/Improve.html

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#create response surface design
fdo = rsmDesign(k = 2, blocks = 2, alpha = "both")

#set two responses for the response surface designs
response(fdo) = data.frame(y= rnorm(14, 12, sd =  2), 
                           y2 =  -2*fdo[,4]^2 - fdo[,5]^2 + rnorm(14, 12))

#set a fit for each response
fits(fdo) = lm(y ~ A*B , data = fdo)
fits(fdo) = lm(y2 ~ A*B + I(A^2) + I(B^2), data = fdo)

#get the fitted response for y2
fits(fdo)[["y2"]]

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