Dear all,
Is it possible to somehow round the value of a parameter to use it to index a look up table?
I am trying to build a regression model in which however I have an additional parameter that determines the value of the regressor. As an example, I want to measure binary choices people make (to take an immediate value or a future one) as a function of the size of the ‘future value’; but how high this ‘future value’ is depends on their mental model and I want to fit an extra parameter to account for how they compute this.
The technical problem I’ve now run into is that computing the future value is prohibitively long within the Stan model. What I can do instead in Matlab is create a look up table that computes the future value for all possible settings of the parameter (bounded between 0 and 1). This is much faster as I can then re-use this value across different participants and different measurements within participants. I could make the steps as small as I want, say 0:0.01:1 and store this lookup table. Can I use parameters from the model (they would need to be rounded to whatever precision I have in the look up table) to index the look up table or does that create a problem for fitting the model appropriately?
Many thanks
Jacquie