wle.ar: Fit Autoregressive Models to Time Series - Preliminary...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/wle.ar.R

Description

This is a preliminary version of functions for the estimation of the autoregressive parameters via Weighted Likelihood Estimating Equations and a cassification algorithm. The main function is wle.ar, the remain functions are for internal use and they should not call by the users. They are not documented here.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
wle.ar(x, order=c(1, 0), seasonal=list(order = c(0, 0), 
       period = NA), group, group.start, group.step=group.start, 
       xreg=NULL, include.mean=TRUE, na.action=na.fail, 
       tol=10^(-6), tol.step=tol, equal=10^(-3), equal.step=equal,
       raf="HD", smooth=0.0031, smooth.ao=smooth, boot=10, 
       boot.start=10, boot.step=boot.start, num.sol=1, x.init=0, 
       x.seasonal.init=0, max.iter.out=20, max.iter.in=50, 
       max.iter.start=200, max.iter.step=500, verbose=FALSE, 
       w.level=0.4, min.weights=0.5, population.size=10, 
       population.choose=5, elements.random=2, wle.start=FALSE, 
       init.values=NULL, num.max=NULL, num.sol.step=2, approx.w=TRUE)

Arguments

x

a univariate time series.

order

a specification of the non-seasonal part of the ARI model: the two components (p,d) are the AR order and the degree of differencing.

seasonal

a specification of the seasonal part of the ARI model, plus the period (which defaults to frequency(x)).

group

the dimension of the bootstap subsamples.

group.start

the dimension of the bootstap subsamples used in the starting process if wle.init=TRUE.

group.step

the dimension of the bootstap subsamples used in a step, it must be less than group.

xreg

optionally, a vector or matrix of external regressors, which must have the same number of rows as x.

include.mean

Should the ARI model include a mean term? The default is TRUE for undifferenced series, FALSE for differenced ones (where a mean would not affect the fit nor predictions).

na.action

function to be applied to remove missing values.

tol

the absolute accuracy to be used to achieve convergence of the algorithm.

tol.step

the absolute accuracy to be used to achieve convergence in a step.

equal

the absolute value for which two roots are considered the same. (This parameter must be greater than tol).

equal.step

the absolute value for which two roots are considered the same in a step. (This parameter must be greater than tol.step).

raf

type of Residual adjustment function to be use: raf="HD": Hellinger Distance RAF, raf="NED": Negative Exponential Disparity RAF, raf="SCHI2": Symmetric Chi-Squared Disparity RAF.

smooth

the value of the smoothing parameter.

smooth.ao

the value of the smoothing parameter used in the outliers classificaton, default equal to smooth.

boot

the number of starting points based on boostrap subsamples to use in the search of the roots.

boot.start

the number of starting points based on boostrap subsamples to use in the search of the roots in the starting process.

boot.step

the number of starting points based on boostrap subsamples to use in the search of the roots in a step.

num.sol

maximum number of roots to be searched.

num.sol.step

maximum number of roots to be searched in a step.

x.init

initial values, a vector with the same length of the AR order, or a number, default is 0.

x.seasonal.init

initial values, a vector with the same length of the SAR order, or a number, default is 0.

max.iter.out

maximum number of iterations in the outer loop.

max.iter.in

maximum number of iterations in the inner loop.

max.iter.start

maximum number of iterations in the starting process.

max.iter.step

maximum number of iterations in a step.

w.level

the threshold used to decide if an observation could be an additive outlier.

population.size

see details.

population.choose

see details.

elements.random

see details.

num.max

maximum number of observations can be considered as possible additive outliers.

wle.start

if TRUE a weighted likelihood estimation is used to have a starting value.

init.values

a vector with initial values for the AR and seasonal AR coefficients and the innovations variance.

verbose

if TRUE warnings are printed.

min.weights

see details.

approx.w

logical: if TRUE an approximation is used to evaluate the weights in the outlier identification procedure.

Details

min.weight: the weighted likelihood equation could have more than one solution. These roots appear for particular situation depending on contamination level and type. We introduce the min.weight parameter in order to choose only between roots that do not down weight everything. This is not still the optimal solution, and perhaps, in the new release, this part will be change.

The algorithm used to classify the observations as additive outliers is made by a genetic algorithm. The population.size, population.choose and elements.random are parameters related to this algorithm.

Value

coef

a vector of AR and regression coefficients.

sigma2.coef

the estimated variance matrix of the coefficients coef.

sigma2

the WLE of the innovations variance.

arma

a compact form of the specification, as a vector giving the number of AR, MA=0, seasonal AR and seasonal MA=0 coefficients, plus the period and the number of non-seasonal and seasonal differences.

resid

the residuals.

resid.with.ao

the residuals with the additive outliers effects.

resid.without.ao

the residuals without the additive outliers effects.

x.ao

the time series without the additive outliers effects.

call

the matched call.

series

the name of the series x.

weights

the weights.

weights.with.ao

the weights with the additive outliers effects.

weights.without.ao

the weights without the additive outliers effects

tot.sol

the number of solutions found.

not.conv

the number of starting points that does not converge after the max.iter.out iteration are reached.

ao.position

the position of the additive outliers.

Author(s)

Claudio Agostinelli

References

Agostinelli C., (2001) Robust time series estimation via weighted likelihood: some preliminary results, Working Paper n. 2001.3 Department of Statistics, University of Padova.

Agostinelli C., (2003) Robust time series estimation via weighted likelihood, in: Development in Robust Statistics. International Conference on Robust Statistics 2001, Eds. Dutter, R. and Filzmoser, P. and Rousseeuw, P. and Gather, U., Physica Verlag.

Examples

1
2
data(lh)
wle.ar(x=lh, order=c(3,0), group=30) 

wle documentation built on May 29, 2017, 11:48 a.m.

Related to wle.ar in wle...