SMAC-Group / gmwm

Generalized Method of Wavelet Moments (GMWM) is an estimation technique for the parameters of time series models. It uses the wavelet variance in a moment matching approach that makes it particularly suitable for the estimation of certain state-space models.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Revisit `gen.gts()` and `gen.lts()` parameter ordering

coatless opened this issue · comments

So, the issue is gen.gts() and subsequently gen.lts() lazily evaluatesn to name as was discussed tonight.

As a result, we have:

screen shot 2016-08-17 at 11 09 09 pm

Only when name = is defined will an error be thrown, e.g.

screen shot 2016-08-17 at 11 09 58 pm

The solution to this is to write the function in a much more R standard notational way ala rdist(n, ...) e.g. rnorm(100).

Doing this would result in gen.gts() changing to:

gen.gts(n, model, ...)

The downside to doing this is two fold:

  1. We always have to specify the number of observations (I argue this is good)
  2. Changing the present documentation to account for the new structure.

Thoughts @robertomolinari and @stephaneguerrier ?

This issue has been addressed.

To facilitate the transition, I've opted to defunct both gen.gts() and gen.lts() in favor of gen_gts(n, model) and gen_lts(n, model). This ensure we avoid having issues with the old model, n syntax.

Commit for gen_gts(n, model): eb15ec7, d175ba3
Commit for gen_lts(n, model): fa7731b, 1edb5dd, cd8c4de