stan-dev / stan-dev/rstanarm

The scale parameter in the decov prior

Open
#105 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
R
Stars
401
Forks
136
PR merge metrics
No merged PRs in 30d

Description

Under the decov prior, we represent a covariance matrix Sigma with

  • A correlation matrix Lambda or really its Cholesky factor L
  • A vector of variances

And the vector of variances is represented as the product of a simplex vector, pi, and the trace of Sigma. In turn, the trace of the KxK matrix Sigma is represented as K times the square of a scale parameter, gamma.

While it is easy to put a LKJ prior on Lambda and a Dirichlet prior on pi, it is not obvious what prior should be used for gamma except that it should be scale-invariant. The scale parameter gamma can be interpreted as the square root of the average variance, but the user might not have much intuition about that.

Alternatively, it is possible to utilize the theory of determinants. det(Sigma) = gamma^{2K} * det(L)^2 * pi[1] * pi[2] * ... * pi[K]. Thus, if det(Sigma) or log(det(Sigma)) were a primitive parameter with a prior distribution, we could easily solve for gamma = pow(det(Sigma) / (det(L)^2 * pi[1] * pi[2] * ... * pi[K]), 0.5 / K). So, the question becomes is it any easier for the user to put a prior on det(Sigma) or any easier for us to choose a reasonable default prior for it. Since det(Sigma) is the product of the eigenvalues of Sigma, log(det(Sigma)) is the sum of the log-eigenvalues of Sigma. A normal distribution is usually appropriate for a sum, in which case det(Sigma) would be lognormal, but what would be the default hyperparameter values for mu and sigma?

From a linear algebra perspective, the determinant of a matrix is fundamental so it seems more reasonable to take it as the primitive. And a user could bound the determinant as far away from zero as is desired. But the same can be achieved with a Gamma prior on gamma as long as the shape hyperparameter is greater than 1.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the decov prior parameterization described in the issue, focusing on gamma, Sigma, Lambda or L, and pi. Compare a scale-invariant prior on gamma with a prior on det(Sigma) or log(det(Sigma)); done requires a justified choice of parameterization and default hyperparameters.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.