Giter VIP home page Giter VIP logo

Comments (4)

robjhyndman avatar robjhyndman commented on June 8, 2024

Thanks for letting me know. I'll fix this in the next version. It doesn't
occur for n<=3 because of a different initialization method used when there
are 3 or fewer observations.


Rob J Hyndman
Professor of Statistics, Monash University

www.robjhyndman.com

On Sat, Sep 21, 2013 at 8:32 AM, havik23 [email protected] wrote:

When attempting to run the main forecast function on a time series object
exceptions are sometimes thrown depending on the size of the vector used to
generate the time series object.

For example:

tsObj <- ts(tsVector[1:6], frequency=12, start=c(2013,4))

where tsVector is just a vector of values. Running this time series object
through the forecast function like so:

pred <- forecast(tsObj, 1)

generates the following error:

Error in lsfit(1:maxn, y.sa[1:maxn]) : 0 responses, but only 2 variables
In addition: Warning message:
In lsfit(1:maxn, y.sa[1:maxn]) : 6 missing values deleted

Vectors of length 1,2,3 or >= 12 do not generate an error.

Also, just wanted to say that this package totally rocks! It has been
instrumental in my work and I greatly appreciate it being made available to
the wider world!


Reply to this email directly or view it on GitHubhttps://github.com//issues/32
.

from forecast.

havik23 avatar havik23 commented on June 8, 2024

Dr. Hyndman,

Thanks for replying. I was wondering if you might be able to recommend a temporary alternative for generating predictions for time series where number of observations range between 4 and 11 using the forecast package? The data set I have contains monthly observations, and in certain instances, I only have somewhere between 4 and 11 observations. Thoughts?

Also, in the cases where n<=3, are you using the meanf function to generate predictions? I was looking through the code and was curious if this was where the different initialization occurs for n<=3.

Thanks again for your time!

from forecast.

robjhyndman avatar robjhyndman commented on June 8, 2024

Just ignore the seasonal models as follows:
forecast(tsObj, h=1, model="ZZN")

Yes, meanf is used for very small data sets. See
forecast:::forecast.ts for the details.


Rob J Hyndman

www.robjhyndman.com

On Sun, Sep 22, 2013 at 2:25 AM, havik23 [email protected] wrote:

Dr. Hyndman,

Thanks for replying. I was wondering if you might be able to recommend a
temporary alternative for generating predictions for time series where
number of observations range between 4 and 11 using the forecast package?
The data set I have contains monthly observations, and in certain
instances, I only have somewhere between 4 and 11 observations. Thoughts?

Also, in the cases where n<=3, are you using the meanf function to
generate predictions? I was looking through the code and was curious if
this was where the different initialization occurs for n<=3.

Thanks again for your time!


Reply to this email directly or view it on GitHubhttps://github.com//issues/32#issuecomment-24865719
.

from forecast.

robjhyndman avatar robjhyndman commented on June 8, 2024

Now fixed

from forecast.

Related Issues (20)

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.