Statalist


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

RE: st: adoupdate question


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: adoupdate question
Date   Tue, 30 Jun 2009 19:06:24 +0100

While this evidently works for -gologit2-, it is emphatically not a
universal solution for reasons explained in the FAQ I referred to
earlier in this thread. 

In essence, -version- is not a time machine, just a flag to Stata that
some features of some commands are until further notice within a program
to run as they used to under a certain version. Even less is -version-
an incantation that solves all version difficulties! 

Nick 
[email protected] 

Richard Williams

As a sidelight, my gologit2 program was written for Stata 8.2, but 
when 9 came out I wanted it to also support some of the new 
properties.  So, the opening code is like this:

capture program gologit2, eclass byable(recall) sortpreserve ///
         properties(swml or rrr irr hr eform)
         if `c(stata_version)' < 9 program gologit2, eclass 
byable(recall) sortpreserve

         if `c(stata_version)' < 9 {
                 version 8.2
         }
         else {
                 version 9
         }

I don't know if that is good programming practice, but it seems to work!

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index