HierAFS | R Documentation |
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.
HierAFS(y,x,m,c,step)
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.