Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: problems with e(sample)


From   Richard Williams <[email protected]>
To   [email protected]
Subject   RE: st: problems with e(sample)
Date   Sun, 18 Jun 2006 22:59:32 -0500

At 09:41 AM 6/18/2006, Nick Cox wrote:
This isn't quite the explanation. You can't save
eclass results with a dataset in any case, so
whether they were or were not present previously
is secondary, indeed immaterial.
Actually, with Michael Blasnik's -estsave- routine (available from SSC) you can save estimation results with the current dataset. Although in the current example, I suppose a -restore- would wipe those out.


The key fact remains that a -restore- loses the
information currently in memory. This is not
just the dataset currently in memory, but also
any eclass and rclass stuff in particular. (And
also ..., but let's focus on the main point.)
As Zurab & Nick have already pointed out, you don't lose all the eclass stuff, just e(sample). As I stated before, my theory is that e(sample) would be too hard to keep, because of all the machinations that may have gone on with the data set in between the preserve and the restore.

As a sidelight, beta versions of gologit2 used preserve and restore (as does the original gologit), but I realized that e(sample) did not work correctly when I did this. I finally figured out how to avoid the preserve and restore. It is probably a little more efficient from a programming standpoint if you can avoid preserve and restore. You of course have to make sure your program isn't making any unwanted changes to the data set.

-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: [email protected]
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index