Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Problem with ereturn repost


From   Sergiy Radyakin <serjradyakin@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Problem with ereturn repost
Date   Wed, 22 Dec 2010 12:05:29 -0500

On Wed, Dec 22, 2010 at 11:28 AM, SCHOUMAKER Bruno
<bruno.schoumaker@uclouvain.be> 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
>
> bruno.schoumaker@uclouvain.be
> 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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index