Description Usage Arguments Value Author(s) References Examples
A Forward Search gives a sequence of regression estimators. This function gives the regression estimators when stopped at m.
1 | ForwardSearch.stopped(FS, m)
|
FS |
List. Value of the function |
m |
Integer. Stopping time. |
ranks.selected |
Vector. Ranks of m observations in the selected set. |
ranks.outliers |
Vector. Ranks of n-m observations that are not selected.
These are the "outliers". It is the complement to |
beta.m |
Vector. Least squares estimator based on |
sigma2.biased Scalar. |
Scalar.
Least squares residual variance based on |
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.stopped(FS95,107)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.