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: AW: RE: RE: RE: RE: RE: where did my matrix go after calling -diagt-
From
moleps <[email protected]>
To
[email protected]
Subject
Re: st: AW: RE: RE: RE: RE: RE: where did my matrix go after calling -diagt-
Date
Thu, 18 Feb 2010 21:30:40 +0100
I tried changing the version statement, but to no help. I ended up storing the diagti var using multiple regular variables. More cumbersome, but at least it works...
Appreciate the efforts,
//M
On 18. feb. 2010, at 15.44, Martin Weiss wrote:
>
> <>
>
> " The revised program is your responsibility"
>
>
>
> Weirdly enough, one of the first lines of -diagti- says
>
> *************
> set trace off
> *************
>
> which added significantly to the time it took me to get to the bottom of
> Moleps` problem. So killing that line may make sense if you are planning to
> clone your own version anyway...
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Nick Cox
> Gesendet: Donnerstag, 18. Februar 2010 15:39
> An: [email protected]
> Betreff: st: RE: RE: RE: RE: RE: where did my matrix go after calling
> -diagt-
>
> Agreed that the finger does point in that direction. The implications for
> Moleps appear to be one or both of
>
> 1. Use some other method for storing results.
>
> 2. Clone -diagti- and try changing the line -clear- to -version 10: clear-.
> The revised program is your responsibility!
>
> Nick
> [email protected]
>
> Martin Weiss
>
> -preserve- does not seem to have much of an effect in this example, though:
>
> *******
> mat a=(1,1)
> mat l a
>
> preserve
> vers 9: clear
> restore
>
> mat l a
> *******
>
> Nick Cox
>
> But that -clear- is preceded by -preserve-, so I'm not sure that's it.
>
> Nick
> [email protected]
>
> Martin Weiss
>
> " Somewhere along that chain, matrices are being cleared."
>
> -diagti- says: -clear- in its line 228, which these days would not hurt
> Moleps' matrices. Yet in this case, -diagt- being old, it is called under
> -version- 9 where a destruction of matrices was still part of -clear-`s
> duties...
>
> Nick Cox
>
> You've got much more than that going on. -diagt- calls -diagti- which calls
> many other things, and so on.
>
> Somewhere along that chain, matrices are being cleared.
>
> It's not your problem below, but I did notice that -diagt- overwrites any
> existing matrix called T. As it destroys such a matrix any way, that's
> incidental, but using a temporary name would be widely considered better
> practice.
>
> Nick
> [email protected]
>
> moleps
>
> I´m creating a table using diagt (available from ssc) for different cutoff
> values of p. However the matrix is lost after calling diagt (version 2.0.5)
> and the same happens using this example-code:
>
> (stata v10.1)
>
> (ssc install diagt)
> sysuse auto.dta
> gen ind=price>10000
> diagt ind foreign
> mat a=(r(sens),r(spec))
> mat list a
> diagt ind foreign
> mat dir
>
> viewsource diagt.ado --no reference as far as I can tell to dropping of
> matrices...Neither with diagti.
>
> There is a previous post with diagt for bootstrap purposes, but there is no
> reference to dropping of matrices.
>
>
> *
> * 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/
*
* 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/