Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Question II about -drawnorm- for two normally distributed variables


From   "Tom Trikalinos" <[email protected]>
To   [email protected]
Subject   Re: st: Question II about -drawnorm- for two normally distributed variables
Date   Tue, 18 Mar 2008 19:50:11 -0400

disregard the last four lines of me previous e-mail...
sorries

t

On Tue, Mar 18, 2008 at 7:47 PM, Tom Trikalinos <[email protected]> wrote:
> covariance and correlation matrices cannot be negative definite.
>
>  your covariance matrix
>
>  .05  .11
>  .11  .02
>
>  e.g. it has a negative determinant (approx -0.011).  Otherwise said,
>  one of the eignevalues is negative (-.076), the other is approx
>  0.15...
>
>  you cov matrix corresponds to a correlation matrix:
>
>  1.0   3.5
>  3.5  1.0
>
>  which is obviously not valid...
>
>  t
>
>  t
>
>  Depending of how this has arisen it may be a mistake, or you may have
>  to "bound" the covariance to correspond to a correlation
>
>
>
>
>  On Tue, Mar 18, 2008 at 6:04 PM,  <[email protected]> wrote:
>  > Dear all,
>  >
>  >  Would it be possible to you to explain why I am getting this:
>  >
>  >  mean1 = 0.4+-0.05 (+-variance)
>  >  mean2 = 0.2+-0.02 (+-variance)
>  >
>  >  covariance = 0.11
>  >
>  >  corr2data cholesterol1 cholesterol2, means(0.4  0.2) cov(0.05, 0.11\ 0.11,
>  >  0.02) cstorage(full) n(100)
>  >
>  >  . 0.05, 0.11\ 0.11, 0.02 not positive (semi)definite
>  >  . r(506);
>  >
>  >
>  >
>  >  Any idea?
>  >
>  >  thank you!
>  >
>  >  Tiago
>  >  *
>  >  *   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index