plot.efp | R Documentation |
Plot and lines method for objects of class "efp"
## S3 method for class 'efp'
plot(x, alpha = 0.05, alt.boundary = FALSE, boundary = TRUE,
functional = "max", main = NULL, ylim = NULL,
ylab = "Empirical fluctuation process", ...)
## S3 method for class 'efp'
lines(x, functional = "max", ...)
x |
an object of class |
alpha |
numeric from interval (0,1) indicating the confidence level for which the boundary of the corresponding test will be computed. |
alt.boundary |
logical. If set to |
boundary |
logical. If set to |
functional |
indicates which functional should be applied to the
process before plotting and which boundaries should be used. If set to |
main , ylim , ylab , ... |
high-level |
Plots are available for the "max"
functional for all process types.
For Brownian bridge type processes the maximum or mean squared Euclidean norm
("maxL2"
and "meanL2"
) can be used for aggregating before plotting.
No plots are available for the "range"
functional.
Alternative boundaries that are proportional to the standard deviation of the corresponding limiting process are available for processes with Brownian motion or Brownian bridge limiting processes.
efp
returns an object of class "efp"
which inherits
from the class "ts"
or "mts"
respectively. The function
plot
has a method to plot the
empirical fluctuation process; with sctest
the corresponding test for
structural change can be performed.
Brown R.L., Durbin J., Evans J.M. (1975), Techniques for testing constancy of regression relationships over time, Journal of the Royal Statistical Society, B, 37, 149-163.
Chu C.-S., Hornik K., Kuan C.-M. (1995), MOSUM tests for parameter constancy, Biometrika, 82, 603-617.
Chu C.-S., Hornik K., Kuan C.-M. (1995), The moving-estimates test for parameter stability, Econometric Theory, 11, 669-720.
Krämer W., Ploberger W., Alt R. (1988), Testing for structural change in dynamic models, Econometrica, 56, 1355-1369.
Kuan C.-M., Hornik K. (1995), The generalized fluctuation test: A unifying view, Econometric Reviews, 14, 135 - 161.
Kuan C.-M., Chen (1994), Implementing the fluctuation and moving estimates tests in dynamic econometric models, Economics Letters, 44, 235-239.
Ploberger W., Krämer W. (1992), The CUSUM test with OLS residuals, Econometrica, 60, 271-285.
Zeileis A., Leisch F., Hornik K., Kleiber C. (2002), strucchange
:
An R Package for Testing for Structural Change in Linear Regression Models,
Journal of Statistical Software, 7(2), 1-38.
\Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v007.i02")}.
Zeileis A. (2004), Alternative Boundaries for CUSUM Tests, Statistical Papers, 45, 123–131.
efp
, boundary.efp
,
sctest.efp
## Load dataset "nhtemp" with average yearly temperatures in New Haven
data("nhtemp")
## plot the data
plot(nhtemp)
## test the model null hypothesis that the average temperature remains
## constant over the years
## compute Rec-CUSUM fluctuation process
temp.cus <- efp(nhtemp ~ 1)
## plot the process
plot(temp.cus, alpha = 0.01)
## and calculate the test statistic
sctest(temp.cus)
## compute (recursive estimates) fluctuation process
## with an additional linear trend regressor
lin.trend <- 1:60
temp.me <- efp(nhtemp ~ lin.trend, type = "fluctuation")
## plot the bivariate process
plot(temp.me, functional = NULL)
## and perform the corresponding test
sctest(temp.me)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.