James-Thorson/2018_FSH556

Indexing different models

Opened this issue · 1 comments

I am trying to figure out how to specify the model to use in the cpp file.
In the "DATA specification portion", I have DATA_VECTOR( ModelNumber ).

This later gets called in the model specification section: if(ModelNumber == 0 ) ... model...

It is unable to read the ModelNumber vector. Should this be a scalar?

I recommend using DATA_IVECTOR where IVECTOR indicates that its a vector of integers, such that you can use == to evaluate whether it takes the value {0,1,2} etc. You could do the same thing using DATA_VECTOR using < and > evaluations but that seems more complicated.