Skip to content
Prev 247339 / 398503 Next

piecewise regression

Hello:


       I just found 58 help pages in 32 contributed packages containing 
the terms "piecewise" and "regression", as follows:


library(sos)
pr <- ???'piecewise regression' # for "piecewise" with "regression"
summary(pr) # 58 matches in 32 packages
pr # view the 58 links sorted by package in a web browser

p.r <- ???"{piecewise regression}" # for "piecewise" followed immediate 
by "regression"
summary(p.r) # 15 matches in 13 packages
p.4 # to view in a web browser


       Beyond this, the "structchange" package supports looking for 
changes that would be, e.g., linear in one segment then jump to a 
different linear regime.  If you want the lines to connect, then you may 
want splines.  Probably the most common spline is cubic, but you can 
also get linear splines.  One of the most general spline packages is 
"fda" (functional data analysis), with multiple companion books by James 
Ramsay and others.  However, there are other spline packages.


       If this does not answer your question, "PLEASE do read the 
posting guide http://www.R-project.org/posting-guide.html and provide 
commented, minimal, self-contained, reproducible code", as it says in 
the signature block for each email on this list.


       Hope this helps.
       Spencer Graves
On 1/14/2011 6:42 AM, Federico Bonofiglio wrote: