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: Problem with ereturn repost


From   SCHOUMAKER Bruno <[email protected]>
To   [email protected]
Subject   Re: st: Problem with ereturn repost
Date   Thu, 23 Dec 2010 16:55:01 +0100

Thanks Sergey. Yes, I received the warning.

There seems to be something wrong when I import data from SAS to compute the variance covariance matrix.

I imported two tables (a correlation matrix and standard errors of regression coefficients) from SAS, and I use them to compute the variance covariance matrix.

When the matrix is computed in Stata, I have this problem. When I compute the matrix in Excel and copy it in Stata, I do not have the problem... I am not sure what the reason is, it looks like the figures are slightly changed when I import the tables from SAS to Stata.

Best,

Bruno



Le 22/12/2010 18:05, Sergiy Radyakin a écrit :
On Wed, Dec 22, 2010 at 11:28 AM, SCHOUMAKER Bruno
<[email protected]>  wrote:
Hello,

I am having a problem with "ereturn repost"

I ran a Poisson model, and want to replace the variance covariance matrix
e(V) with a new matrix VARCOV that I prepared

This is an excerpt of the program

xi3: poisson _d i.ageg rcsp1-rcsp2 dumy93 dumy99 bin93 bin99 bin94 bin100,
exposure(exposy)

capture program drop foo2
program foo2, eclass
tempname vmat
matrix `vmat' = e(V)
matrix `vmat' = VARCOV
ereturn repost V = `vmat'
end

foo2

matrix list e(V)


when I run it, the new matrix e(V) only contains 0s, whereas the VARCOV
matrix does not contain 0s


Has anybody an idea why this happens ?
Yes, you should have a warning somewhere:
"Warning:  variance matrix is nonsymmetric or highly singular".
unless you do capture or quietly..

You may want to inspect your VARCOV matrix for any problems as Stata
refuses to accept not-conforming matrices and simply clears the e(V),
which contradicts the main rule of Stata (if somoething didn't work,
it shouldn't ruin anything), but hey, you'we got the warning.

Best, Sergiy Radyakin.



Thanks

Bruno


symmetric e(V)[15,15]
                     _d:        _d:        _d:        _d:        _d:
  _d:        _d:        _d:
               _Iageg_5   _Iageg_6   _Iageg_7   _Iageg_8   _Iageg_9
  _Iageg_10      rcsp1      rcsp2
  _d:_Iageg_5          0
  _d:_Iageg_6          0          0
  _d:_Iageg_7          0          0          0
  _d:_Iageg_8          0          0          0          0
  _d:_Iageg_9          0          0          0          0          0
_d:_Iageg_10          0          0          0          0          0
  0
    _d:rcsp1          0          0          0          0          0
  0          0
    _d:rcsp2          0          0          0          0          0
  0          0          0
   _d:dumy93          0          0          0          0          0
  0          0          0
   _d:dumy99          0          0          0          0          0
  0          0          0
    _d:bin93          0          0          0          0          0
  0          0          0
    _d:bin99          0          0          0          0          0
  0          0          0
    _d:bin94          0          0          0          0          0
  0          0          0
   _d:bin100          0          0          0          0          0
  0          0          0
    _d:_cons          0          0          0          0          0
  0          0          0

                     _d:        _d:        _d:        _d:        _d:
  _d:        _d:
                 dumy93     dumy99      bin93      bin99      bin94
bin100      _cons
   _d:dumy93          0
   _d:dumy99          0          0
    _d:bin93          0          0          0
    _d:bin99          0          0          0          0
    _d:bin94          0          0          0          0          0
   _d:bin100          0          0          0          0          0
  0
    _d:_cons          0          0          0          0          0
  0          0



--
Bruno SCHOUMAKER

Centre de recherche en démographie et sociétés
Université catholique de Louvain
1-17 PLace Montesquieu
1348 Louvain-la-Neuve
BELGIUM

Tel. +32 10 474136
Fax. +32 10 472952

[email protected]
www.uclouvain.be/demo

*
*   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/


--
Bruno SCHOUMAKER

Centre de recherche en démographie et sociétés
Université catholique de Louvain
1-17 PLace Montesquieu
1348 Louvain-la-Neuve
BELGIUM

Tel. +32 10 474136
Fax. +32 10 472952

[email protected]
www.uclouvain.be/demo

*
*   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