Skip to content
Prev 236098 / 398502 Next

One-sided CUSUM / MOSUM Tests?

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

            
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