Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ihstep

First step in a forward stepwise regression that preserves model hierarchy


Description

This function performs the first step of a hierarchical forward stepwise regression. If an interaction or quadratic term is entered first, the parent main effects are also entered into the model. This function is called by HierAFS.R

Usage

ihstep(y,des,m,c)

Arguments

y

input - this is a data frame containing a single numeric column of response data.

des

input - this is a data frame containing the numeric columns of the candidate independent variables. The column names of des are of length 1 i.e., letters of the alphabet. The m three-level factors always preceed the c two-level factors in the design.

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.

Value

returned vector of terms entered in the model at this step.

Author(s)

John Lawson

Examples

library(daewr)
des <- DefScreen( m = 8 )
pd<-c(5.35,4.4,12.91,3.79,4.15,14.05,11.4,4.29,3.56,11.4,10.09,5.9,9.54,4.53,3.919,8.1,5.35)
trm<-ihstep(pd,des,m=8,c=0)

daewr

Design and Analysis of Experiments with R

v1.2-7
GPL-2
Authors
John Lawson [aut, cre], Gerhard Krennrich [aut]
Initial release
2021-2-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.