Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: xtgee , corr( fixed ??)


From   Joerg Luedicke <[email protected]>
To   [email protected]
Subject   Re: st: xtgee , corr( fixed ??)
Date   Sat, 12 May 2012 19:58:25 -0700

Please disregard my last message, I was on the wrong page here. So
this is indeed weird, your matrix should be legit.

When looking at the trace right before the error message (using your
example with matrix D):

          = if D[2,2] != 1.0 {
          - noi di in red "`cmat' not a correlation matrix"
          = noi di in red "D not a correlation matrix"
D not a correlation matrix

we can see that the check whether the diagonal is 1 fails at D[2,2]
which looks like there is some precision problem involved.

J.

On Sat, May 12, 2012 at 7:14 PM, Joerg Luedicke
<[email protected]> wrote:
> I believe -xtgee- wants to see a full matrix, not just a triangle. For example:
>
> xtgee ln_w grade age c.age#c.age, corr(exchange)
> mat c=e(R)
> xtgee ln_w grade age c.age#c.age, corr(fixed c)
>
>
> J.
>
>
> On Sat, May 12, 2012 at 5:20 AM, Stas Kolenikov <[email protected]> wrote:
>> Folks,
>>
>> what exactly does the -corr(fixed matrix)- option of -xtgee- consider
>> a valid matrix? It seems to have its own weird ideas as to what it
>> will and will not work with:
>>
>> . drawnorm x1-x9, cov( D ) cst(full)
>>
>> . xtgee ln_w grade age c.age#c.age, corr(fixed D)
>> D not a correlation matrix
>> r(198);
>>
>> for some matrix D that I have at hand:
>>
>> mata
>> A = runiform( 9, 9 )
>> B = A + A'
>> C = B + 2*max(B)*I(9)
>> D = syminv(sqrt(diag(C))) * C * syminv(sqrt(diag(C)))
>> D = invsym(sqrt(diag(C))) * C * invsym(sqrt(diag(C)))
>> st_matrix( "D", D )
>> end
>>
>>
>> --
>> ---- Stas Kolenikov
>> -- http://stas.kolenikov.name
>> ---- Senior Survey Statistician, Abt SRBI
>> -- Opinions stated in this email are mine only, and do not reflect the
>> position of my employer
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/statalist/faq
>> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index