Learn R Programming

meboot (version 1.4-3)

meboot: Generate Maximum Entropy Bootstrapped Time Series Ensemble

Description

Generates maximum entropy bootstrap replicates for dependent data. (See details.)

Usage

meboot (x, reps=999, trim=list(trim=0.10, xmin=NULL, xmax=NULL), reachbnd=TRUE,
  expand.sd=TRUE, force.clt=TRUE, scl.adjustment = FALSE, sym = FALSE,
  elaps=FALSE, colsubj, coldata, coltimes, ...)

Arguments

Value

xoriginal data provided as input.ensemblemaximum entropy bootstrap replicates.xxsorted order stats (xx[1] is minimum value).zclass intervals limits.dvdeviations of consecutive data values.dvtrimtrimmed mean of dv.xmindata minimum for ensemble=xx[1]-dvtrim.xmaxdata x maximum for ensemble=xx[n]+dvtrim.desintxbdesired interval means.ordxxordered x values.kappascale adjustment to the variance of ME density.elapselapsed time.

Details

Seven-steps algorithm:
  1. Sort the original data in increasing order and store the ordering index vector.
  2. Compute intermediate points on the sorted series.
  3. Compute lower limit for left tail (xmin) and upper limit for right tail (xmax). This is done by computing thetrim(e.g. 10%) trimmed mean of deviations among all consecutive observations. Thus the tails are uniformly distributed.
  4. Compute the mean of the maximum entropy density within each interval in such a way that themean preserving constraintis satisfied. (Denoted as$m_t$in the reference paper.) The first and last interval means have distinct formulas. See Theil and Laitinen (1980) for details.
  5. Generate random numbers from the [0,1] uniform interval and compute sample quantiles at those points.
  6. Apply to the sample quantiles the correct order to keep the dependence relationships of the observed data.
  7. Repeat the previous steps several times (e.g. 999).

The scale and symmetry adjustments are described in Vinod (2013) referenced below.

In some applications, the ensembles must be ensured to be non-negative. Setting trim$xmin = 0 ensures positive values of the ensembles. It also requires force.clt = FALSE and expand.sd = FALSE. These arguments are set to FALSE if trim$xmin = 0 is defined and a warning is returned to inform that the value of those arguments were overwritten. Note: The choice of xmin and xmax cannot be arbitrary and should be cognizant of range(x) in data. Otherwise, if there are observations outside those bounds, the limits set by these arguments may not be met. If the user is concerned only with the trimming proportion, then it can be passed as argument simply trim = 0.1 and the default values for xmin and xmax will be used.

References

Vinod, H.D. (2013), Maximum Entropy Bootstrap Algorithm Enhancements. http://ssrn.com/abstract=2285041{http://ssrn.com/abstract=2285041}.

Vinod, H.D. (2006), Maximum Entropy Ensembles for Time Series Inference in Economics, Journal of Asian Economics, 17(6), pp. 955-978

Vinod, H.D. (2004), Ranking mutual funds using unconventional utility theory and stochastic dominance, Journal of Empirical Finance, 11(3), pp. 353-377.

See Also

slider.mts.

Examples

Run this code
## Ensemble for the AirPassenger time series data
    set.seed(345)
    out <- meboot(x=AirPassengers, reps=100, trim=0.10, elaps=TRUE)

    ## Ensemble for T=5 toy time series used in Vinod (2004)
    set.seed(345)
    out <- meboot(x=c(4, 12, 36, 20, 8), reps=999, trim=0.25, elaps=TRUE)
    mean(out$ens)  # ensemble mean should be close to sample mean 16

Run the code above in your browser using DataLab