Description Usage Arguments Value Author(s) Examples
This function performs a hierarchical forward stepwise regression. If an interaction or quadratic term is entered in the model, the parent main effects are also entered into the model.
1 |
y |
input - this is a vector containing a single numeric column of response data. |
x |
input - this is a data frame containing the numeric columns of the candidate independent variables. The m three-level factors always preceed the c two-level factors in the design. The factor names or colnames(x) should always be of length (for example letters of the alphabet "A", "B", etc.) |
m |
input - this is an integer equal to the number of three-level factors in the design |
c |
input - this is an integer equal to the number of two-level factors in the design. Note m+c must be equal to the number of columns of des. |
step |
input - this is a single numeric value containing the n umber of steps requested. |
returned data frame the first column is a factor variable containing the formula for the model fit at each step, the second numeric column is the R-square statistic for the model fit with each formula.
Gerhard Krennrich, and modified by John Lawson
1 2 3 4 5 6 7 8 9 10 11 | #Definitive Screening Design
library(daewr)
set.seed(1234)
x <- DefScreen(m=5,c=0)
x$y <- 3*x$A + 2*x$B + 3*x$A*x$B + 2*x$A^2 + 2*x$C+rnorm(nrow(x),0,.5)
HierAFS(x$y,x[,-6],m=5,c=0,step=3)
# Alternate Screening Example
library(daewr)
Design<-Altscreen(nfac=6,randomize=FALSE)
Thickness<-c(4494,4592,4357,4489,4513,4483,4288,4448,4691,4671,4219,4271,4530,4632,4337,4391)
HierAFS(Thickness,Design,m=0,c=6,step=3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.