mpiktas / midasr

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

Cannot run midas_r_simple without additional low frequency variables #55

Closed sweetmoniker closed 6 years ago

sweetmoniker commented 6 years ago

The documentation suggests this is possible (z=NULL), but I cannot get it to run. I always get the following error: Error in matrix(z, ncol = 1) : 'data' must be of a vector type, was 'NULL' Or am I not understanding the documentation correctly?

vzemlys commented 6 years ago

Yes this is a bug.

vzemlys commented 6 years ago

I've fixed in the development version of package. Usually you would not want to use z=NULL, since intercept is the low frequency variable and you would not want to fit a regression model without an the intercept.

sweetmoniker commented 6 years ago

Now when I pull the z variable from the call I get the following error:

Error in optimx.check(par, optcfg$ufn, optcfg$ugr, optcfg$uhess, lower, : Cannot evaluate function at initial parameters

Something about the way the arguments are being passed to the optimx function is failing. I tried to recreate the function manually and received the same result, but I'm not quite sure what some of the calls mean, specifically "all_coef." I added "weight = nealmon" to my call and the returned value basically said there was nothing to optimize. Sorry I can't be more helpful.

vzemlys commented 6 years ago

Can you give a reproducible example? Does the man page code work for you?

sweetmoniker commented 6 years ago

My apologies. If I omit the weight function I get the above error. Including it seems to work.