cran / StepReg

:exclamation: This is a read-only mirror of the CRAN R package repository. StepReg — Stepwise Regression Analysis Report bugs for this package: https://github.com/JunhuiLi1017/StepReg/issues
Other
5 stars 2 forks source link

Error when combining strategy='subset' and include argument #3

Open TimZaragori opened 2 weeks ago

TimZaragori commented 2 weeks ago

Running stepwise with strategy="subset" and using the include argument (ex include=c(var1,var2)) returns an error.

Here is a reproducible example

data(mtcars)

formula <- mpg ~ .

# This is OK
res1 <- stepwise(formula = formula,
                 data = mtcars,
                 type = "linear",
                 include = c("disp", "cyl"),
                 strategy = "forward",
                 metric = "AIC")

# This returns an error
res1 <- stepwise(formula = formula,
                 data = mtcars,
                 type = "linear",
                 include = c("disp", "cyl"),
                 strategy = "subset",
                 metric = "AIC")

Please find below the error: 'names' attribute [2] must be the same length as the vector [1]

gaborcsardi commented 2 weeks ago

Hi, this is a read only mirror of CRAN, please see the package authors in the DESCRIPTION file. Look for Maintainer, BugReports and URL. Thanks!