Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correlation matrix as transformed parameter inits OK, but is then rejected #240

Closed
bob-carpenter opened this issue Sep 25, 2013 · 3 comments
Labels
Milestone

Comments

@bob-carpenter
Copy link
Contributor

Jo(h)n Smith reported the following issue on the mailing list.

// File: corr-init.stan

parameters {
  corr_matrix[100] Omega;
}
transformed parameters {
  corr_matrix[100] OmegaCopy;
  OmegaCopy <- Omega;
}
model {
}

This is still an issue in Stan 2, where running this:

./corr-init sample

produces a stream of errors of the form:

Informational Message: The current Metropolis proposal is about to be rejected becuase of the following issue:
Invalid value of OmegaCopy: Error in function validate transformed params N4stan5agrad3varE: yy is not positive definite. y(0,0) is 1:0.
If this warning occurs sporadically then the sampler is fine,
but if this warning occurs often then your model is either severely ill-conditioned or misspecified.
Rejecting proposed initial value with zero density.

and then finally dies with

Initialization between (-2, 2) failed after 100 attempts. 
 Try specifying initial values, reducing ranges of constrained values, or reparameterizing the model.

Maybe we can (a) initialize randomly a little better by shrinking to identity matrix, or (b) turn down the stringency of our positive-definiteness tests.

@syclik
Copy link
Member

syclik commented Dec 18, 2013

This issue still exists and I'm marking it as a bug.

@bob-carpenter
Copy link
Contributor Author

It's definitely a bug in the way we're checking the
positive-definiteness constraints. I was hoping somebody who
knew more about matrix algebra than me would fix it.

  • Bob

On 12/17/13, 11:08 PM, Daniel Lee wrote:

This issue still exists and I'm marking it as a bug.

@bob-carpenter
Copy link
Contributor Author

Closed, with original issue merged into #256 where there were more comments.

@syclik syclik modified the milestones: v2.2.0, v2.2.0++ Feb 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants