由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - WinBUGS 先验分布设置的问题
相关主题
WinBUGS 先验分布设置的问题问个SAS问题
请教高手:如何在winbugs里使用max(a,b)function?SAS问题求助
Winbugs 求助, 要崩溃了...一个混合型联合分布的问题
请问,如何保存这个WinBUGS程序采的样本菜鸟的WINBUGS问题
【求助】JAGS code for model specificationjags code help, 谢谢!
expected multivariate node--WINBUGS怎样在data step跳过格式不对的data record?
WINBUG initials如何根据cdf(比较复杂,不能求微分)求其pdf
贝叶斯进行点估计的时候 先验概率怎么选择winbugs求助
相关话题的讨论汇总
话题: data话题: dim话题: dunif话题: dnorm话题: structure
进入Statistics版参与讨论
1 (共1页)
m**c
发帖数: 88
1
model{
for (i in 1:n){
y[i,1:2]~ dmnorm( mu[], T[,] )
}
for (i in 1:P){
mu[i] <- inprod(A[i,],x[,])+ A0[i,1]
}

x[1,1] ~ dnorm(0.0, 1.0E-4)
x[2,1] ~ dnorm(0.0, 1.0E-4)
#x[1,1] ~ dunif(3,7)
#x[2,1] ~ dunif(4,8)

T[1:P,1:P] <- inverse(V[,])
}
INITS
list(x = structure(.Data = c(3,6), .Dim =c(2,1)))
DATA (RECT.)
list( n=10, P=2,
A = structure(.Data = c(1.5,1.2, 2, 0.7),.Dim =c(2,2)),
A0 = structure(.Data = c(0.7,0.8),.Dim =c(2,1)),
V = structure(.Data = c(0.25,0,0,1),.Dim =c(2,2)) )
y[,1] y[,2]
12.7322583711556 12.9002919491858
12.0192425225677 12.6475926319601
12.6090783907703 11.3604652340585
12.6812334055904 10.4036955063776
11.6360116159087 11.1230766692850
12.2047338897579 11.1269676727326
11.8372861052357 12.5882280896650
11.9029081398666 12.4102188492234
13.0935333381790 12.2977732136862
12.7465543800294 11.9218429434102
END
为什么我用均匀分布dunif(a,b)作为x[]的先验分布,不管我怎么设施a,b值,采样是
总是报错,无法采样,而换成正太分布dnorm(mean,tau)后,不管怎样设置mean,
tau值,都不会出现这个问题,均匀分布这么不好用啊?什么问题啊?
这个错误是这样的:编译都能通过,最后update时,WinBUGS 报错:
Trap: undefined real result
m**c
发帖数: 88
2
出现这个报错的可能的其他原因,但是还是不清楚为什么用均匀分布就报错?
a) 'undefined real result' indicates numerical overflow. Possible reasons
include:
- initial values generated from a 'vague' prior distribution may be
numerically extreme - specify appropriate initial values;
- numerically impossible values such as log of a non-positive number - check
, for example, that no zero expectations have been given when Poisson
modelling;
- numerical difficulties in sampling. Possible solutions include:
- better initial values;
- more informative priors - uniform priors might still be used but with
their range restricted to plausible values;
- better parameterisation to improve orthogonality;
- standardisation of covariates to have mean 0 and standard deviation 1.
- can happen if all initial values are equal.
1 (共1页)
进入Statistics版参与讨论
相关主题
winbugs求助【求助】JAGS code for model specification
winbugs doodleexpected multivariate node--WINBUGS
谁推荐个稍微advance一点的winbugs参考资料吧WINBUG initials
求助:hierarchical linear model 的问题贝叶斯进行点估计的时候 先验概率怎么选择
WinBUGS 先验分布设置的问题问个SAS问题
请教高手:如何在winbugs里使用max(a,b)function?SAS问题求助
Winbugs 求助, 要崩溃了...一个混合型联合分布的问题
请问,如何保存这个WinBUGS程序采的样本菜鸟的WINBUGS问题
相关话题的讨论汇总
话题: data话题: dim话题: dunif话题: dnorm话题: structure