Re: [R] R strucchange question -- robust regression

From: Achim Zeileis <Achim.Zeileis_at_wu-wien.ac.at>
Date: Thu, 08 May 2008 19:59:39 +0200 (CEST)


On Thu, 8 May 2008, Kittler, Richard wrote:

> Is it possible to use some form of robust regression with the
> breakpoints routine so that it is less sensitive to outliers?

Conceptually, it is possible to use the underlying dynamic programming algorithm for other objective functions than the residual sum of squares. However, the implementation of breakpoints() exploits the special structure of OLS to speed up computations.

For package "fxregime", I've written a more general (and hence even slower) object-oriented implementation. Because it is still a bit instable it's currently hidden in the namespace and essentially undocumented.

It could be used for what you want to do if:

For OLS these would be lm() and deviance():

  ## OLS-optimized interface
  bp1 <- breakpoints(Nile ~ 1)

  ## object-oriented interface
  nile <- data.frame(Nile = Nile)
  bp2 <- fxregime:::gbreakpoints(Nile ~ 1, data = nile,     fit = lm, objfun = deviance)

  ## compare results
  summary(bp1)$breakpoints
  summary(bp2)$breakpoints

So if you've got something sensible as an alternative to lm() and deviance(), you could plug that in. The downsides are: (1) This can be terribly slow. (2) Information criteria are not automatically available for selecting the number of breakpoints.

I hope that helps,
Z

> --Rich
>
> Richard Kittler
> Advanced Micro Devices, Inc.
> Sunnyvale, CA
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 08 May 2008 - 17:59:43 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 08 May 2008 - 18:30:35 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive