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 on April 23, and its replacement, is already up and running.

[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   Paul Seed <>
To   "" <>
Subject   RE: st: AW: RE: RE: RE: RE: RE: where did my matrix go after calling -diagt-
Date   Fri, 19 Feb 2010 21:09:32 +0000

As Nick Cox says, I originally wrote -diagt- & -diagti-,
so will shortly post a new version that fixes the matrix problems
that Moleps and Nick found.

For those in a hurry, it seems that the main problem can be
solved by replacing -clear- with two lines :
   drop _all
   label drop all

-preserve- seems to preserve data and labels, if not matrices,
and that's all that -diagti- needs to change.

How many other things it protects from -clear-, I don't know.
(scalar, cluster, eq, constraint, postutil, _return, mata and everything
done by -discard-).  The manual is not wonderful on this.

The relevant section will read (subject to further checking).

`star' ROC area
   if _N >0 {
       drop _all
       label drop _all

Changing the version of -clear- does not seem to work

foreach v of numlist 1/10 {
   mat a=(`v',`v')
   mat l a

   cap noi vers `v': clear

   cap noi mat l a
Incidentally, I find -set trace off-
a very useful line at the start of an ado file when debugging.
I can then put -set trace on- just before the suspect section of
code & get rather fewer than 1 million lines of output.

The undocuments option -star- shows how far the program has got before
things go wrong.

Paul Seed

King's College London, Division of Reproduction and Endocrinology
St Thomas' Hospital, Westminster Bridge Road, London SE1 7EH

*   For searches and help try:

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