[R] strucchange-esque inference for glms ?

Achim Zeileis Achim.Zeileis at wu-wien.ac.at
Tue Jun 29 11:09:34 CEST 2004


> according to the strucchange package .pdf, "all procedures in this
> package are concerned with testing or assessing deviations from
> stability in the classical linear regression model."
> i'd like to test/assess deviations from stability in the Poisson
> model.
> is there a way to modify the strucchange package to suit my purposes,
> or should i use be using another package,   or is this a tough nut to
> crack? :)

As of version 1.2-0 strucchange supports tests for parameter
instability in much more general models including GLMs. A simple example
would be

R> library(strucchange)
R> data(BostonHomicide)
R> mcus <- gefp(homicides ~ population, family = poisson, fit = glm,
                data = BostonHomicide, vcov = kernHAC)
R> plot(mcus)
R> sctest(mcus)

See our technical report "Generalized M-fluctuation tests for Parameter
Instability" (linked from my web page) for the theory behind it.

> my application is detecting the onset of a flu outbreak as new daily
> data trickles in from each morning from local hospitals.  seems to me
> like the same sort of inferential goal that strucchange refers to as
> "monitoring of structural change."

In principile the theory established in the report above could also be
applied to monitoring, but I have neither worked the theory out nor
implemented a function which could handle monitoring in GLMs. But you
can contact me off-list if you are interested in this.


More information about the R-help mailing list