mpiktas / midasr

R package for mixed frequency time series data analysis.
http://mpiktas.github.io/midasr/
Other
74 stars 34 forks source link

Issue with average_forecast #78

Open Shaoni1334 opened 3 years ago

Shaoni1334 commented 3 years ago

average_forecast seems to have an issue with the scope of the variables in the function. The error message in the following code

`rm(list=ls()) library(midasr) md2<-function(Data){ x<-Data$x y<-Data$y l=2 mod<-midas_r(y ~ mls(x,l:(l+2),3), start=NULL) avgf<-average_forecast(list(mod), data=list(x=x,y=y), insample = 1:200, outsample = 201:300, measures = "MSE", show_progress = F) }

Data<-list(x=rnorm(900), y=rnorm(300)) md2(Data) `

vzemlys commented 2 years ago

Yeah, this is an issue, which is a bit tricky to fix. Will have a look someday.