5

I am using the mars function of the R earth package. When the degree of interaction of MARS terms is at least 1, is it possible to have quadratic terms like x1*x1 in the model? I guess interactions between different hinge functions are possible. What about raw input variables like x1?

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
Patrick Balada
  • 609
  • 9
  • 16

1 Answers1

6

Yes with some modification.

On its own, MARS won't try to take higher-order functions of the predictors. MARS can only include three types of basis functions:

  1. A constant
  2. A hinge function
  3. Interactions of hinge functions

You can "trick" MARS into including a quadratic term by making a new variable xnew = x1*x1 then fitting MARS. MARS will not derive this xnew variable on its own, though.

Eli
  • 1,682
  • 10
  • 24