# Using multiple index variables in Turing model

**URL:** <https://discourse.julialang.org/t/using-multiple-index-variables-in-turing-model/75743>\
**Category:** Statistics\
**Tags:** turing\
**Created:** [February 3, 2022, 5:33pm UTC](https://discourse.julialang.org/t/using-multiple-index-variables-in-turing-model/75743 "2022-02-03T17:33:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ewcrombe](https://avatars.discourse-cdn.com/v4/letter/e/eb8c5e/32.png) [@ewcrombe](https://discourse.julialang.org/u/ewcrombe)\
**Post date:** [February 3, 2022, 5:33pm UTC](https://discourse.julialang.org/t/using-multiple-index-variables-in-turing-model/75743/1 "2022-02-03T17:33:40Z")

</div>

Hello everyone,

I would like to use two index variables in a model, but I don’t know how to do it… I would like to do something like this:

```julia
@model function m2(A, G, D)
    α ~ MvNormal([[0 0]
                   [0 0]], 1)
    p = α[G, D]
    A ~ arraydist(LazyArray(@~ BernoulliLogit.(p)))
end

```

But this obviously gives an error. Is there a way to do this?
