I have a problem using the Mars function and earth function in R program: the variables x and y differ in number of rows but the Mars function and earth function does not accept them. can you help me ?
You must make sure the dependent and independent variables have the same length. I suggest sampling at the same size and find out which rows of data are missing values, maybe use omit.na()