Comments (6)
Current behaviour is exactly like lm
. In the data
argument you pass the data where named columns correspond to variables, and the construction of the model is governed by formula interface. So for your example the specification would be
midas_r(rGDPg2~fmls(MonMulti,ratio-1, ratio, nealmon),data=midasdata,start=list(MonMulti=c(1,-0.1)))
where
midasdata <- list(rGDPg2=y,MonMulti=x)
If rGDPg2
and MonMulti
are in Global environment, then there is no need to specify the data argument, the behaviour which is consistent with lm
.
I do not see the benefits of your proposal and I immediately see several problems related to the implementation. For example how would I know that nealmon restriction should be used? Maybe I misunderstand something, could you elaborate more on your proposal, or specifically what problems do you see with the current implementation?
from midasr.
My point is that the formula gets excessively large when there are more variables, so I think it would increase readability and formula flexibility (i.e. if a formula is constructed on-the-fly) to prepare a list of mls matrices first. Then the formula's job is only to specify my model, not to prepare data.
from midasr.
There is still a question of how the restriction would be defined in such case. All of the potential restrictions use the same mls
matrix. It would be possible to implement this using the attributes
, but I do not see how this would improve the clarity. Yes the formula would be smaller, but
- a user would not see what restriction is used in the model definition
- if a user wants to change the restriction, then he/she will need to update the matrix, instead of the formula
- user would be required to track the alignment of the matrices, i.e. that their dimensions match. This includes caring about
NA
values, etc. Currently this is automatically handled by the formula interface, you only need to make sure that your mixed frequency data is aligned, which is much more natural to do for the original data, not for its transformations. - formula interface allows to specify transformations of the variables. For example taking logarithm of the variable. To make it happen with your proposed format, I would need to reimplement the way R formula works.
from midasr.
Ok, your last point is the most striking one. The mls is just a transformation of data as the log, etc. is and belongs in the formula.
Thank you for your time, you are doing a great job with midasr!
from midasr.
You are welcome.
from midasr.
Now you can also use function midas_r_simple
. This function does not use formula interface and expects matrices prepared with mls
. This function is currently available in development version of midasr, which you can install using install_("midasr","mpiktas","np")
. See the example in ?midas_r_simple
.
from midasr.
Related Issues (20)
- Not possible to estimate MIDAS model, more parameters than observations // midasr package HOT 4
- two step ahead forecast HOT 1
- Question of MIDAS with panel data HOT 1
- Error in hAh_test() HOT 4
- Contribution variables
- fitted value of in-sample based on average_forecast()
- Issue with average_forecast HOT 1
- Variable lengths differ (trend) HOT 1
- Stationarity - Transformations for Mixed Frequency Data HOT 1
- markov-switching midas models HOT 3
- error when use select_and_forecast HOT 1
- Impove mlsd to work correctly with dates
- Add forecasting to midas_sp, midas_nlpr, midas_mmm and midas_lstr
- Write proper documentation for non-parametric models
- Lint the package
- Regarding k in the mls() HOT 1
- Average Forecast Combination Weight Assignment HOT 2
- how to use polystep in a midas_r formula? HOT 3
- Consistent warning messages in the midasr package and unrealistic MSE in and out sample values for a regression. HOT 3
- incorrect average_forecast values for midas_regressions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from midasr.