Naive_Natural2511
Naive_Natural2511

Reputation: 717

Inverse gamma prior in rjags model

How do I specify the Inverse Gamma prior of (0.5, 0.5) in rjags?

I tried

prec ~ dgamma(1.0/2.0, 1.0/2.0)
tau <- sqrt(1/prec)

Not sure is this the right way to specify.

Upvotes: 1

Views: 636

Answers (1)

hellsgate666
hellsgate666

Reputation: 1

Can you try making 3 different parameters (prec, sigma2, and tau (or sigma))?

sigma2 <- 1/prec
tau <- sqrt(sigma2)

Upvotes: 0

Related Questions