Ticket #21034

「使い方」にある記述ミス

Open Date: 2010-03-09 16:29 Last Update: 2010-03-10 09:14

Reporter:
Owner:
Type:
Status:
Closed
Component:
(None)
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
None
File:
None

Details

Wataru Uda 様

すばらしいソフトウェアを開発していただきありがとうございます。 説明ページの「使い方 - とりあえず使う」に従っても、結果が得られないことが分かりましたので報告します。

ページには、

library(rmagro) data <- list( x <- c(1, 2, 3, 4, 5), y <- c(1, 3, 3, 3, 5), N <- 5 ) x <- magro.samples("model.bug", 2000, 500, list.data=data, monitor=c("x1", "x2", "x3", "x4"), n.chain=3) summary(x) plot(x)

というコードがあるのですが、 データを格納するリストのコードは、

data <- list( x = c(1, 2, 3, 4, 5), y = c(1, 3, 3, 3, 5), N = 5 )

にしなければなりません。

また、BUGS code は、 model {

for (i in 1:N) {
mui <- alpha + beta*(xi - x.bar); Yi ~ dnorm(mui,tau);
} x.bar <- mean(x[]); alpha ~ dnorm(0.0,1.0E-4); beta ~ dnorm(0.0,1.0E-4); tau ~ dgamma(1.0E-3,1.0E-3); sigma ~ 1.0/sqrt(tau);

}

とありますが、末尾の

sigma ~ 1.0/sqrt(tau);

は、

sigma <- 1.0/sqrt(tau);

としないと走りません。

以上です。 今後のバージョンアップ(特に、とりあえずはポアソン分布の実装)にも期待しています。

Ticket History (3/7 Histories)

2010-03-09 16:29 Updated by: noryanzu
  • New Ticket "「使い方」にある記述ミス" created
2010-03-09 16:30 Updated by: noryanzu
  • Status Update from Open to Closed
  • Ticket Close date is changed to 2010-03-09 16:30
2010-03-09 16:33 Updated by: noryanzu
  • Details Updated
  • Status Update from Closed to Open
2010-03-09 16:33 Updated by: noryanzu
  • Status Update from Open to Closed
  • Ticket Close date is changed to 2010-03-09 16:33
2010-03-09 20:43 Updated by: udawtr
Comment

ご指摘ありがとうございます。 説明ページのご指摘箇所を修正しました。

2010-03-09 23:24 Updated by: noryanzu
Comment

もうひとつ指摘するのを忘れてました。 monitor=c("alpha","beta","tau") とかにしないと動作しないと思います。

2010-03-10 09:14 Updated by: udawtr
Comment

noryanzu への返信

もうひとつ指摘するのを忘れてました。 monitor=c("alpha","beta","tau") とかにしないと動作しないと思います。

ありがとうございます。 修正しました。

Attachment File List

No attachments

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login