# Summary statistics for arbitrary variables within Turing model

**URL:** <https://discourse.julialang.org/t/summary-statistics-for-arbitrary-variables-within-turing-model/43120>\
**Category:** Probabilistic Programming\
**Tags:** turing\
**Created:** [July 15, 2020, 11:19am UTC](https://discourse.julialang.org/t/summary-statistics-for-arbitrary-variables-within-turing-model/43120 "2020-07-15T11:19:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![balaji1975](https://avatars.discourse-cdn.com/v4/letter/b/8edcca/32.png) [@balaji1975](https://discourse.julialang.org/u/balaji1975)\
**Post date:** [July 15, 2020, 11:19am UTC](https://discourse.julialang.org/t/summary-statistics-for-arbitrary-variables-within-turing-model/43120/1 "2020-07-15T11:19:47Z")

</div>

Hi -  
Is there a way to get summary stats on theta defined in the model below?

> @model schools(y, s) = begin  
> N = length(y)  
> eta = Array{Float64}(undef, N)  
> theta = Array{Float64}(undef, N)  
> mu ~ Uniform(-100, 100)  
> tau ~ Uniform(0, 100)  
> eta ~ MvNormal(fill(0, N), 1)  
> theta = mu .+ (tau .\* eta)
> 
> ```
> for i = 1:N
> y[i] ~ Normal(theta[i], s[i])
> end
> 
> mu, tau, eta
> 
> ```
> 
> end

Can workout from the chain data on mu, tau and eta. Wondering if there is a way to accomplish it within Turing.

Thanks!

---

<div class="post-metadata">

**Author:** ![cpfiffer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cpfiffer/32/208747_2.png) [@cpfiffer](https://discourse.julialang.org/u/cpfiffer)\
**Post date:** [July 15, 2020, 2:37pm UTC](https://discourse.julialang.org/t/summary-statistics-for-arbitrary-variables-within-turing-model/43120/2 "2020-07-15T14:37:58Z")

</div>

Nope, not right now. It’s a feature target we’re shooting for, though. I think there’s some hacks people have come up to do this with but I can’t find them.

---

<div class="post-metadata">

**Author:** ![balaji1975](https://avatars.discourse-cdn.com/v4/letter/b/8edcca/32.png) [@balaji1975](https://discourse.julialang.org/u/balaji1975)\
**Post date:** [July 15, 2020, 10:30pm UTC](https://discourse.julialang.org/t/summary-statistics-for-arbitrary-variables-within-turing-model/43120/3 "2020-07-15T22:30:38Z")

</div>

Thank you.
