Error using chol

I’m a pretty new user and I’m playing around with some codes, actually without paying too much attention to the actual data I plugged in…

May the error

Error using chol
Matrix must be positive definite.

depend “simply” from me being inaccurate with actual data ?

There is a whole bunch of issues that could cause this, but wrong data is a prime reason.

When you talk about data, what really matters?
The way left it stationary. Whether the data are quality.
And how does it to find the cause of this problem?
Is there a literature on the subject?

I am referring to an incorrectly specified observation equation, see Pfeifer(2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models”