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

From |
"Nick Cox" <n.j.cox@durham.ac.uk> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: new user written program stochastic inequality |

Date |
Mon, 9 Mar 2009 10:46:18 -0000 |

As Martin Weiss underlined, sending attachments is explicitly deprecated in the FAQ. (Which part of this is difficult to understand?) Also, the same FAQ explains, in detail, that no programs automatically enter the SSC archives. I looked through the program and help quickly and have the following comments. Some identify major bugs or confusions. I have not tried to use it or check it thoroughly. Given the comments below, it seems to me premature to post this program on SSC and I advise against it. 1. Version. The program claims -version 9.1- but the help file, stochin.sthlp, requires Stata 10 to be automatically readable via -help-. This should be documented or fixed (e.g. Stata 9 users advised to convert to .hlp, or .hlp provided). 2. Bug. There is undocumented support for -in-, but it is buggy. Any user-specified -in- will be matched by `touse', but that is never used after it is created. The authors do not appear to understand what -marksample- does and how its results should be used. 3. Limitation. The program does not support -if-. 4. Style. The line -args varlist- is redundant. The line -tempvar sec first- is redundant. 5. Style. The lines local `v' end ... `v' are a roundabout way of saying -end-. 6. Bug and inefficiency. summarize `firstvar' should be summarize `firstvar' if `touse', meanonly Similarly for `secondvar'. 7. Bugs. -summarize- counts non-missings, but Mata is at first passed all values, including any missings. There is an undocumented and implicit assumption that all missings have been sorted to the end. There is no check on whether the same observations both contain non-missings for the two variables. Comparing different numbers of values could make some sense, but is not standard in Stata as a default. The calculation for data contains all data for two variables, `m' for the first variable and `l' for the second, but the shuffles work differently, with min(`m', `l'). 8. Limitation. The program repeatedly shuffles data. A good standard in such programs is to provide an option for the user to set the random number seed explicitly. 9. Style. It is better style to return numeric scalar results as scalars, not locals. 10. Documentation. `without any assumptions' is a strong claim: mutual independence of the values of each variable? 11. Documentation. -sysuse auto- is irrelevant to the example following. 12. Documentation. "Non-paramteric" is a typo. "a a" is a typo. 13. Documentation. The help refers the user to a manual entry in [R], but this is a user-written command, and there is no such entry. 14. Documentation. There is no documentation of returned values. 15. Documentation. There is no statement of program authors or their contact details. 16. Documentation. A URL should be provided for the paper cited. 17. Documentation. A Stata program in this area should acknowledge (and ideally compare) other Stata programs in similar territory e.g. Roger Newson's -somersd-. 18. Question. The program seems dedicated to fixed-level testing. Many users would prefer to see P-values as well. Nick n.j.cox@durham.ac.uk sander wagner I attach a newly written program with help file for a test on stochastic inequality. This is the first time i post. Will the program automatically enter the stata archives? The program is explained in the help files and the underlying theory is derived from the following paper: Schlag, Karl H. 2008, A New Method for Constructing Exact Tests without Making any Assumptions, Department of Economics and Business Working Paper 1109, Universitat Pompeu Fabra which can be downloaded on this website http://www.iue.it/Personal/Schlag/ Any comments are highly welcome, also since this is the first program I post, can I expect it to appear in the ssc downloads soon? If you are interested in testing the program i could provide you with some data for which using the test makes sense. * * 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/

**References**:**st: new user written program stochastic inequality***From:*sander wagner <sanderwagner@gmail.com>

- Prev by Date:
**RE: st: RE: RE: Two-word commands with gettoken** - Next by Date:
**st: simple "merge" question** - Previous by thread:
**Re: st: new user written program stochastic inequality** - Next by thread:
**RE: st: RE: use Mata to calculate the eigenvalues of the matrix** - Index(es):

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