What is the 'scale' parameter in 'rstanarm' in general?

Hello,

In this answer, @bgoodri taught me that the scale parameter in rstanarm::stan_lmer, to which we assign a Gamma prior with the help of prior_covariance = decov(......), corresponds to the between standard deviation in the case of a one-way ANOVA model with a random factor (y ~ (1|factor)).

But what is this parameter for a general Gaussian linear mixed model? For example a two-way ANOVA (with/without interaction). And how to control the prior distribution on the group-levels variance components if there are multiple ones?

Just found some helpful information.

I’m lost. Is it something like that:

data {
  int<lower=1> J; // number of between variances
  ...
}

parameters {
  real<lower=0> tau;
  vector<lower=0>[J] theta;
  corr_matrix[J] Omega;
  ...
}

transformed parameters {
  real<lower=0> sigma_between_total;
  vector<lower=0>[J] sigmas_between;
  cov_matrix[J] Sigma; 
  sigma_between_total = sqrt(J) * tau; 
  Sigma = quad_form_diag(Omega, sigma_between_total * sqrt(theta));
  for(j in 1:J){
    sigmas_between[j] = Sigma[j,j];
  }
}

model {
  tau ~ gamma(shape, scale);
  theta ~ dirichlet_rng(rep_vector(concentration, J));
  Omega ~ lkj_corr(regularization);
  ...
}

I don’t think so, because the covariances play no role here…

Tagging @jonah as I don’t understand rstanarm very well…

Best of luck with the model!

Some info here.