[R] One-sided CUSUM / MOSUM Tests?

Achim Zeileis Achim.Zeileis at uibk.ac.at
Tue Sep 28 10:41:22 CEST 2010


On Mon, 27 Sep 2010, bonda at hsu-hh.de wrote:

> Dear R-help list members,
>
> I have the following question concerning the strucchange()-package: is it 
> possible to get the boundaries for one-sided (upper / lower) CUSUM and MOSUM 
> tests?

Not out of the box, at least not exactly. You can do this:

library("strucchange")
ocus <- efp(Nile ~ 1, type = "OLS-CUSUM")
plot(ocus, boundary = FALSE)
lines(boundary(ocus, 0.1), col = 2)

i.e., approximate the one-sided 5% boundary by the 10% two-sided boundary. 
But, of course, this ignores the probability of multiple crossings (which 
is low at conventional levels).

Using the function efpFunctional() you can also simulate the distribution 
of arbitrary test statistics, including those corresponding to one-sided 
boundaries. The result is intended for use with the function gefp().

Finally, for some of the boundaries, closed-form solutions are available 
in "strucchange", e.g., for the boundary used above. To compute this a 
series expansion is employed, only the first term of which is required for 
the one-sided boundary. So if you take the necessary pieces from the 
underlying code, you can also compute one-sided boundaries.

hth,
Z

> Thank you in advance.
>
> Julia
>
> ______________________________________________
> 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