Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: strange -storecmd- behavior


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: strange -storecmd- behavior
Date   Thu, 8 Dec 2005 14:38:54 -0000

Thanks to Kit Baum, a revised version 
of the -storecmd- package is now up 
on SSC. 

What this package does is best seen by 

. ssc type storecmd.hlp 

Any users of -storecmd-, -stowcmd-, 
-repcmd- under Stata 6 should do nothing. 

Any users of -storecmd- etc. under
Stata 7 up should install the new version. 

This package is based on an idea by Alan 
Feiveson, who remains its keenest (and perhaps
only!) user. Thanks again to him for alerting 
me to the problem and to Jean Marie Linhart 
for diagnosis and code suggestions. 

Nick 
[email protected] 

FEIVESON, ALAN
 
> Thanks Nick and Jean Marie - 
> 
> -storecmd- is one of my favorites and I'll be looking forward 
> to using the new improved model.

Nick Cox

> Interestingly, this fix to the version
> control problem itself runs into a
> version control problem. Under Stata 7, the option -missing- 
> was not allowed
> with -version-, so a further level of handling is required. 
> 
> Also, I no longer have Stata 6
> installed, but the original versions
> should work with Stata 6. 
> 
> I'll post revised files to Kit Baum in due course. 
  
> > Yes indeed. How stupid of me not to see that. Thanks very much.
  
Jean Marie Linhart, StataCorp LP

> > > Al Feiveson asked:
> > > 
> > > > Nick I was using -storecmd- to do -xtintreg- but I
> > obtained slightly
> > > > different results after the -storecmd- statement and then if I 
> > > > repeat the analysis with a straight command. For some 
> reason, with 
> > > > "storecmd", the integration method used is "ghermite" (not the 
> > > > default), whereas with the straight command, it 
> correctly uses the 
> > > > default "aghermite". But I never issued an option for
> > "ghermite" so
> > > > what's going on?
> > > 
> > > Nick Cox replied:
> > > 
> > > > I can't explain this, but I don't see that it's anything
> > to do with
> > > > -storecmd-. -storecmd- doesn't reach inside your command
> > and change
> > > > it. Nor can I think of side-effects that would cause 
> this. Still, 
> > > > lack of imagination is not proof of absence.
> > > 
> > > I can explain what is going on.  -storecmd- sets -version
> > 6.0- in its
> > > code, so when it runs the -xtintreg- command, it is run as
> > version 6.
> > > Under version control, -xtintreg- properly reverts to the 
> old method 
> > > of Gauss-Hermite quadrature which was used in versions prior to 9.
> > > 
> > > When Al Feiveson runs his code from the command line, he is using 
> > > version 9, and he gets version 9 behavior.
> > > 
> > > We (at StataCorp) run into this sort of issue with 
> version control 
> > > frequently (crack  the hood on -xtintreg- itself for
> > > example...) if Nick
> > > wants to change  the behavior of -storecmd-, I'd suggest he
> > change the
> > > portion of his code that executes the command from: 
> > > 
> > >         * execute command
> > >         `cmd'
> > >         
> > > to:
> > > 
> > > 	* execute command
> > >         local vv : di "version " string(_caller()) ", missing :"
> > >         `vv' `cmd'
> > > 

*
*   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