Currently I am trying to estimate the following model, but i seem to be having determinacy issues between my beta and gamma parameters. The overall question being answered here is i want to assess the beta value which is essentially the difficulty of an individual item on its own (like item content), and gamma, the difficulty associated with item type. So for example, items 1-4 may be multiple choice, 5-8 could be open ended, etc. The data is count data, i.e. something like number of actions taken by an examinee during an item. So one gamma value is being applied to multiple items. I have tried different constraints and summing to 0 but I cannot seem to get the parameters to match my true generating parameters. They do get pretty close but sometimes the beta and gamma values deviate more than desired. I have never had an issue with theta as it always seems to estimate closely to my true thetas. Theta is essentially my intercept, and i would like to keep beta and gamma as independent fixed effects. Does anyone have any suggestions?

```
data {
int<lower=0> N; // number of persons
int<lower=0> J; // number of items
int<lower=0> T; // number of item types
int<lower=0> Y[N, J]; // responses
int<lower=1,upper=T> item_type[J]; // item type for each item, so it could be (1,1,1,1,2,2,2,2,3,3,3,3) for example
}
parameters {
vector[N] theta_raw;
real <lower=0> sd_theta;
vector[T] gamma;
vector[J] beta_raw;
real<lower=0> sd_beta;
}
transformed parameters {
vector[J] beta;
vector[N] theta;
beta = beta_raw * sd_beta;
theta = theta_raw * sd_theta;
}
model {
// Priors
theta_raw ~ normal(0, 1);
sd_theta ~ lognormal(0, 1);
beta_raw ~ normal(0, 1);
sd_beta ~ lognormal(0, 1);
gamma ~ normal(0,1);
matrix[N, J] lambdas;
for (j in 1:J) {
lambdas[,j] = exp(theta - beta[j] - gamma[item_type[j]]);
target += poisson_lpmf(Y[,j] | lambdas[,j]);
}
}
```

If interested the model in question is a mix between a rasch poisson count model and a faceted rasch model.

faceted rasch model

logit(P_{jik})= \theta_j - \beta_i - \gamma_k

Where P_{jik} is the probability of correct response by person j to item i at position k. Higher values in are associated with lower probabilities of a correct response. For this reason, we refer to \gamma_k as difficulty for position k. In this model, position facet is assumed to be independent of item difficulty \beta_i, That is, the position effect is considered uniform across all items administered at a particular position. I am trying to use this model and instead of item position, substitute item type, and sample from the poisson distribution as my data is count data.

The original rasch poisson counts model

\begin{equation}
\lambda = \exp(\theta - \beta )
\end{equation}

The end results which is in my STAN model.

\begin{align*}
\lambda_{ij} &= \exp(\theta_i - \beta_j - \gamma_{\text{{item_type}}_j})
\end{align*}