winbugs - BUGs error message -
i new winbugs/openbugs , having difficulty de-bugging code. error message "expected variable name". not find variable, not defined. code follows:
model { y[1:3]~dmulti(p[1:3],m) p[1:3]~ddirch(alpha[]) } list ( y=c(383465, 467074, 142852), m=993391 )
i have found errors follows:
1.the space can't follow "list". therefore, should be
list( y=c(383465, 467074, 142852), m=993391 )
2.the full codes should add definition alpha[] follows:
model { y[1:3]~dmulti(p[1:3],m) p[1:3]~ddirch(alpha[]) (r in 1:3){alpha[r]<-1} } list( y=c(383465, 467074, 142852), m=993391 )
this seems small problem, occurs in newcomers!!
Comments
Post a Comment