Description Usage Arguments Value Author(s) References Examples
View source: R/ForwardSearch.r
Plots forward residuals with simultaneous confidence bands based on Johansen and Nielsen (2013, 2014).
1 2 3 4 |
FS |
List. Value of the function |
ref.dist |
Character. Reference distribution.
|
bias.correct |
Logical. If FALSE do not bias correct variance, so plots have appearance similar to Atkinson and Riani (2000). If TRUE do bias correct variance, so plots start at origin. Default is FALSE. |
return |
Logical. Default is FALSE: do not return values. |
plot.legend |
Logical. Default is TRUE: include legend in plot. |
col |
|
legend |
|
lty |
|
lwd |
|
main |
|
type |
|
xlab |
|
ylab |
|
ref.dist |
Character. From argument. |
bias.correct |
Logical. From argument. |
forward.residual.scaled |
Vector. Forward residuals scaled by estimated variance.
The estimated variance is or is not bias corrected depending on the choice of
|
forward.asymp.median |
Vector. Asymptotic median. |
forward.asymp.sdv |
Vector. Asymptotic standard deviation. Not divided by squareroot of sample size. |
cut.off |
Matrix. Cut-offs taken from Table 3 of Johansen and Nielsen (2014). |
Bent Nielsen <bent.nielsen@nuffield.ox.ac.uk> 9 Sep 2014
Johansen, S. and Nielsen, B. (2013) Asymptotic analysis of the Forward Search. Download: Nuffield DP.
Johansen, S. and Nielsen, B. (2014) Outlier detection algorithms for least squares time series. Download: Nuffield DP.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #####################
# EXAMPLE 1
# using Fulton Fish data,
# see Johansen and Nielsen (2014).
# Call package
library(ForwardSearch)
# Call data
data(Fulton)
mdata <- as.matrix(Fulton)
n <- nrow(mdata)
# Identify variable to reproduce Johansen and Nielsen (2014)
q <- mdata[2:n ,9]
q_1 <- mdata[1:(n-1) ,9]
s <- mdata[2:n ,6]
x.q.s <- cbind(q_1,s)
colnames(x.q.s ) <- c("q_1","stormy")
# Fit Forward Search
FS95 <- ForwardSearch.fit(x.q.s,q,psi.0=0.95)
ForwardSearch.plot(FS95)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.