search for: seqrep

Displaying 2 results from an estimated 2 matches for "seqrep".

Did you mean: seqres
2005 Mar 02
1
Leaps & regsubsets
...y = nox, wt = cnt, method = "Cp", nbest = 2, names = names(vars)) Error in leaps(x = vars, y = nox, wt = cnt, method = "Cp", nbest = 2, : leaps does not allow more than 31 variables; use regsubsets() regsubsets(x = vars, y = nox, weights = cnt, method = "seqrep", nbest = 1, names = names(vars), nvmax = 3) 1 subsets of each size up to 4 Selection Algorithm: 'sequential replacement' Warning message: 37 linear dependencies found in: leaps.setup(x, y, wt = weights, nbest = nbest, nvmax = nvmax, Is there someone who could shine a few...
2013 Jun 04
1
How to write a loop in R to select multiple regression model and validate it ?
...ets I would like to run the following code: library(leaps) forward <- regsubsets(Y ~.,data = training, method = "forward", nbest=1) backward <- regsubsets(Y ~.,data = training, method = "backward", nbest=1) stepwise <- regsubsets(Y ~., data = training, method = "seqrep", nbest=1) exhaustive <- regsubsets(Y ~.,data = training, method = "forward", nbest=1) summary(forward) summary(backward) summary(stepwise) summary(exhaustive) I would like R programme to select the best model (with the highest adjusted R2) using each of the selection methods, so...