wle.fracdiff: Fit Fractional Models to Time Series - Preliminary Version

Description Usage Arguments Details Value Author(s) References Examples

View source: R/wle.fracdiff.R

Description

This is a preliminary version of functions for the estimation of the fractional parameter via Weighted Likelihood Estimating Equations and a cassification algorithm. The main function is wle.fracdiff, 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
wle.fracdiff(x, lower, upper, M, group, na.action=na.fail,
  tol=10^(-6), equal=10^(-3), raf="HD", smooth=0.0031,
  smooth.ao=smooth, boot=10, num.sol=1, x.init=rep(0,M),
  use.uniroot=FALSE, max.iter.out=20, max.iter.in=100,
  max.iter.step=5000, max.iter.start=max.iter.step,
  verbose=FALSE, w.level=0.4, min.weights=0.5, init.values=NULL,
  num.max=length(x), include.mean=FALSE, ao.list=NULL, elitist=5,
  size.generation=5, size.population=10, type.selection="roulette",
  prob.crossover=0.8, prob.mutation=0.02, type.scale="none", scale.c=2)

Arguments

x

a univariate time series.

lower

the lower end point of the interval to be searched.

upper

the upper end point of the interval to be searched.

M

the order of the finite memory process used to estimate the d parameter.

group

the dimension of the bootstap subsamples.

na.action

function to be applied to remove missing values.

tol

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

equal

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

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.

num.sol

maximum number of roots to be searched.

x.init

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

use.uniroot

default: FALSE, if TRUE in each step the weighted likelihood estimating equations is solved, otherwise, a maximization is performed on a weighted log-likelihood function with fixed weights. The estimators obtain with the two methods is the same.

max.iter.out

maximum number of iterations in the outer loop.

max.iter.in

maximum number of iterations in the inner loop.

max.iter.step

maximum number of iterations in a step.

max.iter.start

maximum number of iterations in the starting process.

verbose

if TRUE warnings are printed.

w.level

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

init.values

a vector with initial values for the d and the innovations variance.

num.max

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

include.mean

Should the model include a mean term? The default is TRUE.

ao.list

possible list of pattern of additive outliers.

min.weights

see details.

size.population

see details.

size.generation

see details.

prob.crossover

see details.

prob.mutation

see details.

type.scale

see details.

type.selection

see details.

elitist

see details.

scale.c

see details.

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 a simple genetic algorithm as described in Goldberg (1989). The size.population, size.generation, type.selection, prob.crossover, prob.mutation, type.scale, type.selection, elitist and scale.c are parameters related to this algorithm.

Value

d

the WLE of the fractional parameter.

sigma2

the WLE of the innovations variance.

x.mean

the WLE of the mean.

resid

the residuals.

resid.without.ao

the residuals with the additive outliers effects.

resid.with.ao

the residuals without the additive outliers effects.

x.ao

the time series without the additive outliers effects.

call

the matched call.

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., Bisaglia L., (2002) Robust estimation of ARFIMA processes, manuscript.

Goldberg, David E., (1989) Genetic Algorithms in Search, Optimization and Machine Learning. Addison-Wesley Pub. Co. ISBN: 0201157675

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
  set.seed(1234)
  resw <- wle.fracdiff(Nile, M=100, include.mean=TRUE, lower=0.01,
    upper=0.96, group=20)
  resw$d
  resw$sigma2
  resw$x.mean
  ## Not run: 
  x <- Nile
  x[50] <- x[50]+4*sd(x)

  set.seed(1234)
  resw <- wle.fracdiff(x, M=100, include.mean=TRUE, lower=0.01,
    upper=0.96, group=40)
  resw$d
  resw$sigma2
  resw$x.mean
  resw$ao.position
  
## End(Not run)

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

Related to wle.fracdiff in wle...