搜索
人大经济论坛 附件下载

附件下载

所在主题:
文件名:  新建文本文档.txt
资料下载链接地址: https://bbs.pinggu.org/a-1452365.html
附件大小:
谁能帮我看看这个程序用什么软件编写的?能不能转换用R软件编写。


subroutine hpd(n,alpha,x,alow,aupp)c computing 100(1-alpha)% HPD and credible intervals for x c use Chen-Shao HPD Estimation Algorithm c (see page 219 of Monte Carlo Methods in Bayesian Computation, Springer-Verlag, 2000) c ming-hui chenc july 23, 2001 at wpic input:c alpha: confidence level,0 < alpha < 1c n = mcmc sample sizec x(n): a univariate vector of mcmc sample c output: c (alow(1),aupp(1)): 100(1-alpha)% HPD intervalc (alow(2),aupp(2)): 100(1-alpha)% Bayesian credible intervalc implicit real*8 (a-h,o-z) real*8 x(n) real*8 aupp(2),alow(2) q1=(alpha/2.0d0)*real(n) q2=(1.0d0-alpha/2.0d0)*real(n) nq1=nint(q1) nq2=nint(q2) nq=nq2-nq1 do 100 i=1,n-1 do 110 j=i+1,n if (x(i) .gt. x(j)) then temp=x(i) x(i)=x(j) x(j)=temp endif 110 continue 100 continue do 120 j=1,n-nq pdiff1=x(j) pdiff2=x(j+nq) wb=pdiff2-pdiff1 if (j .eq. 1) then whpd=wb aupp1=pdiff2 alow1=pdiff1 else if (whpd .gt. wb) then whpd=wb aupp1=pdiff2 alow1=pdiff1 endif endif 120 continue alow(1)=alow1 aupp(1)=aupp1 alow(2)=x(nq1) aupp(2)=x(nq2) return end


    熟悉论坛请点击新手指南
下载说明
1、论坛支持迅雷和网际快车等p2p多线程软件下载,请在上面选择下载通道单击右健下载即可。
2、论坛会定期自动批量更新下载地址,所以请不要浪费时间盗链论坛资源,盗链地址会很快失效。
3、本站为非盈利性质的学术交流网站,鼓励和保护原创作品,拒绝未经版权人许可的上传行为。本站如接到版权人发出的合格侵权通知,将积极的采取必要措施;同时,本站也将在技术手段和能力范围内,履行版权保护的注意义务。
(如有侵权,欢迎举报)
二维码

扫码加我 拉你入群

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

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

GMT+8, 2025-12-30 16:18