# Bayesian Model Initial Parameters

How does Pumas calculate initial parameter of the omegas in a Bayesian model for Inverse Gamma distribution ?

For e.g. if I define an omega like this: `ω²SCR0 ~ InverseGamma(10/2, 0.145*(10 + 1 + 1)/2)` and run `init_params(model)` I see `ω²SCR0 = 0.18625925314116212`. I want to know where the 0.186… number is coming from?
Also, is there some underlying meaning in writing 10/2 as opposed to 5, or (10+1+1)/2 instead of 6 in the specification of the distribution ?

My view is that if you do an `init_params` in a Bayesian model it will sample prom the prior.

``````julia> using Distributions

julia> ω²SCR0 = InverseGamma(10/2, 0.145*(10 + 1 + 1)/2)
InverseGamma{Float64}(
invd: Gamma{Float64}(α=5.0, θ=1.149425287356322)
θ: 0.8699999999999999
)

julia> rand(ω²SCR0)
0.2632303021306265

julia> rand(ω²SCR0)
0.5991101635236422

julia> rand(ω²SCR0)
0.270555800869863

julia> rand(ω²SCR0)
0.11468427269228272

julia> rand(ω²SCR0)
0.09238162211517542

julia> rand(ω²SCR0)
0.29396951024526896
``````
1 Like

It’s actually the median.

``````julia> median(InverseGamma(10/2, 0.145*(10 + 1 + 1)/2))
0.18625925314116207
``````
3 Likes