GithubHelp home page GithubHelp logo

Comments (3)

Theo24K avatar Theo24K commented on September 26, 2024

step <- midas_r(y~mls(y,1,1)+mls(xx,0:3,3,polystep),start = list(xx=list(c(1,2,3,4),3,3,a=c(2,2,2)))), for example, i tried this,and error:Error in polystep(c(xx1 = 1, xx2 = 2, xx3 = 3, xx4 = 4), 4L, 3) :
argument "a" is missing, with no default
came out, how to set the starting value properly?

from midasr.

vzemlys avatar vzemlys commented on September 26, 2024

You should supply a into mls, not in start. The following should work:

step <- midas_r(y~mls(y,1,1)+mls(xx,0:3,3,polystep,a=c(2,2,2)),start = list(xx=list(c(1,2,3,4))))

Starting values are only needed for the parameters of weight function which are optimized. In step function parameter a is fixed.

from midasr.

Theo24K avatar Theo24K commented on September 26, 2024

Thanks!
I encountered a new error when using average_forecast(), like this,
avgf09.fixed <- average_forecast(list(nealmon09,almonp09,beta0.09,betan.09,step.09),data = list(y=y,xx=xx),
insample = 1:47,outsample = 48:50,
type = 'fixed',
measures = c("MSE","MAPE","MASE"),
fweights=c("EW","BICW","MSFE","DMSFE"))
Error in midas_r.fit(prepmd) :
The optimisation algorithm of MIDAS regression failed with the following message:
Error in if (sum(nb) < eps) { : missing value where TRUE/FALSE needed

Please try other starting values or a different optimisation function
how to solve this ?

from midasr.

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.