1
$\begingroup$

My main goal is making predictions using a nonlinear model that have many independent variables.

I would like to split my numerical independent variables into ranges/parts. Then to use a combination of these ranges to predict a dependent variable. Suppose I split each variable A, B and C into 4 ranges. I will have 4^3 combinations. Is there any type of regression that do the optimal splitting and give results for each combination ?

$\endgroup$
  • $\begingroup$ Why do you want to split? $\endgroup$ – user2974951 Feb 15 '19 at 10:52
  • $\begingroup$ Suposse I have a numerical independent variable that goes from 100 to 200. I want to do like 100-125 -> 1 . 125-150->2 . 150-175->3 . 175-200->4 . In this way I can use the numbers as factors and the combine with other factors. Thanks. $\endgroup$ – Pedro Serra Feb 15 '19 at 11:14
  • $\begingroup$ Have a look at stats.stackexchange.com/questions/68834/… for why that is a bad idea. $\endgroup$ – user2974951 Feb 15 '19 at 11:45
1
$\begingroup$

The R segmented package might offer what you are looking for: https://cran.r-project.org/web/packages/segmented/segmented.pdf

"Given a regression model, segmented `updates' the model by adding one or more segmented (i.e., piece-wise linear) relationships. Several variables with multiple breakpoints are allowed."

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.