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?
Asked
Active
Viewed 188 times
1 Answers
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:
- A constant
- A hinge function
- 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
-
1Thanks for the quick answer and a solution/trick :-) – Patrick Balada Aug 02 '21 at 20:14