全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 MATLAB等数学软件专版
1518 7
2012-04-09
想請問大大們,我是WinBUGS的初學者,
下面程式的意思是甚麼?
dnorm  ??
I(0,1) 是指介於0 1之間的意思嗎??
麻煩各位大大了。

lam1 ~dnorm(0,0.25)I(0,1)
二维码

扫码加我 拉你入群

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

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

全部回复
2012-4-9 11:02:53
mu has a standard normal prior distribution
  mu ~ dnorm(0,1)
dnorm(0,1)I(0,) means the prior will be restricted to the range (0,Inf)
二维码

扫码加我 拉你入群

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

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

2012-4-9 12:21:42
謝謝epoh大大,我知道了!!!
二维码

扫码加我 拉你入群

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

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

2012-4-10 13:54:39
epoh 发表于 2012-4-9 11:02
mu has a standard normal prior distribution
  mu ~ dnorm(0,1)
dnorm(0,1)I(0,) means the prior will ...
請問epoh大大會下面的問題嗎???謝謝~

若求 Y~N(0,1)
如果 Y>0 則 YY=1
         Y<0 則 YY=0
該如何寫程式呢?

我會寫 Y~dnorm(0,1)而已,
那判斷式  if      Y>0 則 YY=1
                  else  Y<0 則 YY=0

二维码

扫码加我 拉你入群

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

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

2012-4-10 14:20:01
s19880711 发表于 2012-4-10 13:54
請問epoh大大會下面的問題嗎???謝謝~

若求 Y~N(0,1)
The step function in WinBUGS
is such that step(x) equals 1 if x>= 0 and equals 0 otherwise.

x <- step(Y-7.5)
x is a step function which will take on the value 1 if Y >=7.5 , and 0 if 7 or less.
二维码

扫码加我 拉你入群

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

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

2012-4-10 14:42:37
epoh 发表于 2012-4-10 14:20
The step function in WinBUGS
is such that step(x) equals 1 if x>= 0 and equals 0 otherwise.
謝謝epoh大大,
不好意思 想再請問
我生成
Y[i,1:2] ~ dmnorm(mu[i,1:2],tau[1:2,1:2])
但我要 Y[i,1] if Y[i,1] >0 則 Y[i,1]==1
                    else Y[i,1]==0,

但是我直接在我的生成下面直接加入
      Y[i,1] <- step(Y[i,1])
可是是錯的耶!!!我不知道為什麼???
麻煩大大了~謝謝!!!
二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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