I couple follow-up questions on QR.

It seems more natural to me to have the thing we are putting the prior on be a “parameter.” Instead of having `beta_tilde`

be defined as a parameter and `beta`

be defined as a “transformed parameter”, can I switch them, and have `beta`

be the parameter and `beta_tilde`

be transformed?

Also, before implementing the QR decomposition, I was fitting the model using a “Matt trick” on `beta`

. i.e., in the “transformed parameters” section I would define `beta = mu_beta + sigma_beta * beta_raw`

, where `beta_raw`

has a N(0,1) prior. Note that this allows the prior mean for beta to be non-zero (so shrinkage of the betas can go towards a non-zero number).

Putting these two concepts together, I would like to set up my model as follows:

```
parameters {
real alpha;
real mu_beta;
vector[P] beta_raw;
real<lower = 0> sigma_beta;
real<lower = 0> sigma;
}
transformed parameters {
vector[P] beta = mu_beta + sigma_beta * beta_raw;
vector[P] theta = R * beta;
}
model {
// Priors
mu_beta ~ normal(0,10);
beta_raw ~ normal(0,1);
sigma_beta ~ normal(0,1);
// Likelihood
y ~ normal(Q_ast * theta + alpha, sigma);
}
```

Does this make sense? Are there any trade-offs in doing it this way compared to the way it is modeled in the “case study”?