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])
可是是錯的耶!!!我不知道為什麼???
麻煩大大了~謝謝!!!