zward / Amua

An open source modeling framework
GNU General Public License v3.0
33 stars 11 forks source link

Transitional probabilities in a "distribution", not a fixed value (Table) #58

Open yangszuchun opened 1 year ago

yangszuchun commented 1 year ago

I created tables for transitional probabilities at time t. If I would like to allow the transitional probabilities vary in a certain "distribution", not just a fixed value. How to modify the table?

Many thanks for your help!

Best, Szu-Chun

zward commented 1 year ago

Hi Szu-Chun, Tables can only contain fixed values, but tables can be used as inputs into probability distributions which return a vector/matrix of sampled values. If you create a table (matrix) with the parameters for the distribution you can use the table columns as arguments when calling the distribution, and then reference the resulting vector/matrix of values by index. See this FAQ for more details: https://github.com/zward/Amua/wiki/FAQ#How-do-I-use-a-vector-parameter Best, Zach

yangszuchun commented 1 year ago

Thank you so much, Zach! Although tables only contain fixed values. I do appreciate your kind comment.

Best, Szu-Chun