[R] strucchange Nyblom-Hansen Test?

Achim Zeileis Achim.Zeileis at uibk.ac.at
Sat Oct 15 10:21:09 CEST 2011


On Fri, 14 Oct 2011, buehlerman wrote:

> Thanks a lot for your immediate help and detailed explanation!
>
> About one thing I'm not quite clear:
>
> When the default fit = glm in gefp() is used:
> sctest(gefp(Employed ~ Year + GNP.deflator + GNP + Armed.Forces, data =
> longley, fit = lm), functional = meanL2BB)

To understand what exactly is tested, it may help to decompose this into 
the steps (1) model fitting, (2) process setup, (3) test statistic 
computation.

m <- lm(Employed ~ Year + GNP.deflator + GNP + Armed.Forces,
   data = longley)
p <- gefp(m, fit = NULL)
sctest(p, functional = meanL2BB)

To see which parameters are assessed you can look at

estfun(m)

or the corresponding fluctuation process

plot(p, aggregate = FALSE)

both of which have one column per parameter. The visualization for the 
Nyblom-Hansen test statistic

plot(p, functional = meanL2BB)

does not show the individual processes because you first aggregate across 
parameters using the squared Euclidian norm (before taking its mean).

> is this then the original Nyblom's Parameter Stability Test (1989) or is 
> it the joint (Nyblom-)Hansen test with theta = (beta) constant instead 
> of theta = (beta, sigma^2) constant ?

The original Nyblom suggestion was for ML estimation of a distribution 
with one parameter (without covariates). Hansen extended this to the 
linear regression model and proposed to either compute one test statistic 
per parameter (which you can do with the "parm" argument of gefp) or a 
joint statistic for all parameters. Hansen included in "all" parameters 
also the variance, but the idea can be directly modified to any other 
model with a vector of parameters.

The reason that estfun(lm_object) does not include the variance is that 
coef(lm_object) and vcov(lm_object) etc. also do not include it. So it is 
the conceptual question whether lm() computes the OLS estimator or the 
full ML estimator. The normlm() wrapper on the ?DJIA man page is one 
possibility to switch to the ML view for the purposes of using 
"strucchange".

hth,
Z

> --
> View this message in context: http://r.789695.n4.nabble.com/strucchange-Nyblom-Hansen-Test-tp3887208p3905669.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
>



More information about the R-help mailing list