I have a data set with 841 rows and 13 columns and a response variable
as a vector of 841 elements. on which I have run stepwise. If I ask for
method = "exhaustive" I get an error message that I don't understand:
> stepwise(training.data, training.response, method = "exhaustive")
Warning messages:
length of data is longer than product of dimensions, data truncated
in: array(data, dim[2:1])
Problem in stepwise(training.data, training.response, method =
"exhaustive"): The Fortran code has returned as error
-- check the consistency of the arguments supplied
Use traceback() to see the call stack
If I run any other method, I still get the following warning:
Warning messages:
length of data is longer than product of dimensions, data truncated
in: array(data, dim[2:1])
According to the documentation, stepwise expects x to be either a matrix
or dataframe of explanatory variables, and y to be a vector of
responses. In my case, "x" is a 841 x 13 matrix, and "y" is a vector of
length 841. All variables are continuous.
What might be wrong with the data I'm passing to stepwise?
Kim Elmore
|