Help on step wise function

I have dataset that has two factors in it. When i try to run stepwise on this i get the error that the 'list' cannot be coerced to type 'double'. I have verified these are factors and are not a 'list'. When i remove the factors from the dataset i can run the stepwise without any issues.

Currently running 2023.03.0 Build 386 on MAC OS and on a Windows Laptop. Same results on both machines.

Team League Year RS RA W
"factor" "factor" "numeric" "numeric" "numeric" "numeric"
OBP SLG BA Playoffs
"numeric" "numeric" "numeric" "numeric"

step_results <- stepwise(RS ~.,

  •                      data = bdata,
  •                      select = "adjRsq")

Error in is.factor(x) : 'list' object cannot be coerced to type 'double'

the first thing to do is to check the documentation for stepwise to check you are using it correctly.
What package provides it ?

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.