Hi!

I am trying to build a kind of a IRT model using multiple parameters for each person, one for each required skill.

I wanted to model it in a hierarchical way, so that every person parameter has a prior and latter these people share a common prior as well.

My question is:

How to do that in an efficient way, since my parameter has 2 dimensions? My attempt was this:

```
matrix[J, K] theta;
for (i in 1:J){
theta[i] = to_row_vector(rep_array(theta_g[i], K));
}
```

is it correct? Does it makes sense?

Full code:

```
data{
int<lower=1> J; // # of students
int<lower=1> K; // # of skills
int<lower=1> I; // # of questions
int<lower=1> N; // total # of answers
int Q[I, K]; // Q matrix
int<lower=0, upper=1> y[N]; // correctness for n
int ii[N]; // question index
int jj[N]; // person for n
}
parameters {
vector[I] beta;
vector[J] theta_g;
}
transformed parameters{
matrix[J, K] theta;
for (i in 1:J){
theta[i] = to_row_vector(rep_array(theta_g[i], K));
}
}
model {
theta_g ~ normal(0, 10);
beta ~ normal(0, 1);
for (n in 1:N){
real alpha;
// skills required by the question
alpha = dot_product(to_row_vector(Q[ii[n]]), theta[jj[n]]);
y[n] ~ bernoulli_logit(alpha - beta[ii[n]]);
}
}
```

Thanks