全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 winbugs及其他软件专版
1696 1
2014-06-26
I am building a stock-recruitment hierarchical model for Atlantic cod in WinBUGS14. In this case, I'm estimating several hyperparameters across several different and exchangeable stocks. BEFORE I can do that, I must standardize across stocks because recruit age is different for each stock according to the following:

复制代码

where Rp is the predicted (number of recruits)Rs is the actual observed number of recruits for a given stock, s
maxA is the maximum age recruit that appears for ALL stocks sAge is the recruitment age for stock, M is the mortality rate for recruits.

In this case, I am ONLY interested in looking at how much M varies to determine if the standardization is appropriate to carry through to my stock-recruit model. I have a datafile and initial values for 2 chains. stockstart indicates the starting value of stock s, and stockfinish indicates the finishing value of stock s. I had to set it up this way so that all of my data is in one file. So when you see stockstart[Group]:stockfinish[Group], it simply denotes the start and finish values of stock s with the designation Group[1....12] for 12 groups. CodSR indicates the sum total of all values across 12 stocks (in this case I have 423 recruit values for 12 Groups's). NGroup indicates the total number of Groups (I'm using 12 for my model). When I run the script, I am getting an "Undefined Real Result" Trap, but I'm not sure what the problem is. Here is my code:.
复制代码

I have attempted to change my starting values, truncate my distributions, provide less information for my prior distributions (gamma distributions), and keepe all my distributions lognormal. It seems that Nothing has worked so I'm pretty stuck at this point. Can anyone help?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2014-6-26 20:55:22
At first sight it appears you have a prior problem with M values getting negative and going pretty high. Isn't M[i]~dnorm(Mo,Mprec)I(,0.000000001) supposed to be M[i]~dnorm(Mo,Mprec)I(0.000000001,).

Note that even with this correction you will have strange values for M, going super high. therefore I would try finding a more approriate specification for M priors at first. Why not constrain variance or try an uniform distribution.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群