# st: Re: positive definite matrices

 From "Rodrigo A. Alfaro" To Subject st: Re: positive definite matrices Date Wed, 20 Sep 2006 15:10:48 -0400

```Jason,

A is positive definite if for any vector z then z'Az>0... quadratic form.
Liberal translation: a positive definite refers in general to the variance
should be positive. Therefore, you have a negative variance somewhere.

In your case, the command tries to get the correlation using all the
available information... because you have missing something the
correlations that you get do not meet the condition that the var-cov
is positive definite.

Solutions: (1) use casewise, from the help file "Specifying casewise
ensures that the estimated covariance matrix will be of full rank and
be positive definite." (2) fill some missing data with -ipolate- or
-impute-, (3) drop the too-much missings variables, (4) work with
multiple-imputation datasets... using -ice- or some other package.

Rodrigo.

----- Original Message -----
From: "Jason Yackee" <jyackee@law.usc.edu>
To: <statalist@hsphsun2.harvard.edu>
Sent: Wednesday, September 20, 2006 2:46 PM
Subject: st: positive definite matrices

I am trying to run -xtpcse, pairwise- on unbalanced pooled cross
sectional time series data, with no single period common to all panels.

Depending on the model I can occasionally get the routine to work by not
including panel and/or time dummies.  But usually the routine spits out
error message r(506), which in long form is explained thus:

[P]     error . . . . . . . . . . . . . . . . . . . . . . . .  Return
code 506
matrix not positive definite;
You have issued a matrix command that can only be performed on a
positive definite matrix and your matrix is not positive
definite.

I know very little about matrix algebra.  Would someone be willing to
substantively "translate" the error message?  I would love to have a
more intuitive sense of what my problem is, and how I might go about
fixing it.

Jason Webb Yackee, PhD Candidate; J.D.
Fellow, Gould School of Law
University of Southern California
jyackee@law.usc.edu
Cell: 919-358-3040

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```