Hi. In order to implement a hierarchical model for marathon times i need one different variable for each runner, since they don’t all have the same number of race years. For example if the dataset has 100 runners i cant do something like
meanRunner = pm.StudentT(“meanRunner” nu=3, mu=meanYear,sigma=sigma_muRunner,shape=(100,4))
since not all 100 runners have run in 4 race years. There are some with 2 races years, some with 3 etc.
So if runner 1 has run in 4 races and runner 2 in 2 i have to go in a for loop and create each variable like
meanRunner1 = pm.StudentT(“meanRunner1” nu=3, mu=meanYear,sigma=sigma_muRunner,shape=4)
meanRunner2 = pm.StudentT(“meanRunner2” nu=3, mu=meanYear,sigma=sigma_muRunner,shape=2)
and then stack them like stack([meanRunner1,meanRunnner2] etc. For a small number up to 10-15 the loop is working and i am getting what i need but for a larger number i get
UserWarning: Loop fusion failed because the resulting node would exceed the kernel argument limit.
and the program breaks.
Is there a way to handle this situation?
Thanks in advance