Code Monkey home page Code Monkey logo

legion's People

Contributors

config-i1 avatar eddelbuettel avatar nikdraka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

legion's Issues

Implement VETS-PIC

Things to do:

  1. parameters checks,
  2. maker,
  3. initialiser,
  4. name of the model

auto.ves()

The function that does model selection for ves. This can be done in a very wide sense, selecting components and then checking if grouped, dependent or individual parameters are needed

oves(), ovets() - occurrence parts for ves() / vets()

This is a followup thing based on Svetunkov&Boylan research. The idea is to model occurrence variables in groups.

Things to do:

  1. Proper prediction intervals for ives / ivets;
  2. Likelihood calculation;
  3. Information criteria;
  4. Automatic selection of the type of model in oves() / ovets().

State space VARIMA

Create state-space VARMA with order selection, blackjack and hookers.

Simulate method for VETS

Implement the simulate method for VETS. As simple as that. In order to do that, we need sim.vets() function.

Prediction intervals for ves() and vets()

In the best case these should include:

  1. "conditional" - elliptic intervals for each j. These are correct, but are very hard to evaluate and return. Their usefulness is questionable.
  2. "unconditional" - rectangular regions for each separate series for each j=1,..,h. These are just projections of the max and min values of ellipses on separate axes. These are incorrect but could be useful;
  3. "independent" - assuming independence between series and based on variances for each separate series. These are even less correct than (2), but still useful.
    The simplest one is (3). It is already available in ves() and vets(). The hardest one is (1).

One of the options - produce general class from ves() / vets() and create functions that would extract and plot things.
For example:

ourModel <- ves(Y, intervals="conditional", level=0.95)
plotEllipse(ourModel, h=1)

ourModel$bounds would contain matrix with upper and lower bounds of y_1, y_2, y_3 etc conditional on a value of y_k (could be a large matrix). In case with "unconditional" or "independent" this thing would simplify to a matrix with one row.
plotEllipse() function would plot all the ellipses for h=1.

Make proper outlierdummy

This should involve quantiles of multivariate normal distribution (isolines) in order to mark residuals as outliers. Currently it works in a univariate style.

ves function fails with colnames error if h=1

Hi config-i1,

thanks for your package! I like it. However, I ran into a little bug today. We can reproduce that easily using the Example code:

library(legion)
Y <- ts(cbind(
    1000 + 0.5 * c(1:100) + rnorm(100, 0, 10),
    cbind(1000 + 1.5 * c(1:100) + rnorm(100, 0, 10))
),
frequency = 12
)
ves(Y, h = 2, holdout = TRUE, silent = FALSE)
ves(Y, h = 1, holdout = TRUE, silent = FALSE)

The second call to ves (the one with h=1) throws errors with the following message:

Error in `colnames<-`(`*tmp*`, value = dataNames) : 
  attempt to set 'colnames' on an object with less than two dimensions

I guess that there is an object that becomes a vector if h=1 and therefore looses its colnames attribute.

Maybe you can look into that. Or provide some guidance on how to fix it myself. I'd be more than happy to open a PR.

Thanks in advance
BerriJ

Develop auto.vets() function

This should do selection based on the following steps:

  1. Apply VETS(Z,Z,Z)PIC(N,N,N)
  2. Select VETS(,,*)PIC(Z,Z,Z):
  • Select P,
  • Select I,
  • Select C, based on I (if it is individual, don't try it).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.