Need R package for piecewise linear regression?

Does anyone know about a piecewise linear regression package?

+4
source share
5 answers

You can also check the breakpoints function in the strucchange package. I used it when I had an unknown number of breakpoints. It is easy to use and has good documentation.

+3
source

there is a function called piecewise.linear in the SiZer package .

Finding RSeek.org is often a good place for those occasions when you want to find out if something already exists.

+5
source

Check Segmented Package

+5
source

Not sure if this will help, but what about the packet land that does MARS?

0
source

There is an M5P method in the RWeka package. This is a regression tree with linear equations in the leaves. Code example

 library("RWeka") MT_model <- M5P(DEP ~ ., data = my_data) 

There are some parameters that need to be configured ...

  MT_model <- M5P(DEP ~ ., data = my_data, control = Weka_control(M = 4, N = FALSE, U = TRUE, R = FALSE)) 

To view a description of the settings:

 WOW('M5P') 

But there is also a carriage package that can adjust your settings automatically.

 library(caret) train(DEP ~ ., data = my_data, method = 'M5') 
0
source

Source: https://habr.com/ru/post/1310073/


All Articles