powered by
Graphical representation of the selected terms using stepwise procedure for different values of the penalty parameter.
stepEvolution(X,Y,formula,P=1:7,K=10,test=NULL,graphic=TRUE)
a list with the different criteria for different values of the penalty parameter. This list contains:
the values for the penalty parameter
size m of the selected model for each value in P
m
P
the value of the R2 criterion for each model
R2
According to the value of the test argument, other criteria are calculated:
test
R2test
Q2
RMSE
a data.frame containing the design of experiments
a vector containing the response variable
a formula for the initial model
a vector containing different values of the penalty parameter for which a stepwise selected model is fitted
the number of folds for the cross-validation procedure
an additional data set on which the prediction criteria are evaluated (default corresponds to no test data set)
if TRUE the values of the criteria are represented
TRUE
D. Dupuy
step procedure for linear models.
step
if (FALSE) { data(dataIRSN5D) design <- dataIRSN5D[,1:5] Y <- dataIRSN5D[,6] out <- stepEvolution(design,Y,formulaLm(design,Y),P=c(1,2,5,10,20,30)) }
Run the code above in your browser using DataLab