[R] gefp() boundaries?

Achim Zeileis Achim.Zeileis at uibk.ac.at
Wed Oct 5 07:32:04 CEST 2011


On Tue, 4 Oct 2011, bonda wrote:

> Hello all,
>
> I have the following two questions: 1) how can I get the values of
> boundaries for fluctuation process gefp(), for functionals maxBB, meanL2BB,
> etc?

Both, maxBB and meanL2BB, are objects of class "efpFunctional" that 
contain several functions including $computeCritval and $boundary that 
compute the critical value c and base boundary b(t), respectively. The 
full boundary is the c * b(t). In case of maxBB and meanL2BB however, the 
boundary is constant anyway, i.e., b(t) = 1, so you essentially need only 
the critical value.

## compute and plot gefp
library("strucchange")
data("durab")
scus <- gefp(y ~ lag, data = durab)
plot(scus, functional = meanL2BB)

## add the critical value (= boundary here) in another color
abline(h = meanL2BB$computeCritval(0.05, nproc = 2), col = 4)

> 2) how can I get fragments of gefp()-process, e.g., if I have n=200
> observations, i=1,2,...,200, and need gefp()[50:100], i.e. from i=50 till
> i=100?

gefp_object$process has the cumulative score process as a "zoo" object 
which preserves the original time scale of the data (if any), e.g.

   proc <- scus$process
   window(proc, start = 2000, end = 2001)
   proc[11:20]

Note, however, that the process has n+1 observations because an additional 
zero is added as the first element (to facilitate visualizations etc.).

See ?gefp, ?efpFunctional for more information and in particular

      Zeileis A. (2006), Implementing a Class of Structural Change
      Tests: An Econometric Computing Approach. _Computational
      Statistics & Data Analysis_, *50*, 2987-3008.
      doi:10.1016/j.csda.2005.07.001.

hth,
Z

> Thank you in advance,
> Julia
>
> --
> View this message in context: http://r.789695.n4.nabble.com/gefp-boundaries-tp3872529p3872529.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