Statalist


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

st: re: problem with options


From   Kit Baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: re: problem with options
Date   Fri, 9 Nov 2007 19:11:59 -0500

Tiago has problems with options. The reason why MODEL is demanded is that he has not made it optional; Stata supports non-optional options.

. capture program drop rtpcr

. *! rtpcr v1. TVP 2007
. program define rtpcr, rclass
1. version 9.2
2. syntax varlist(min=2 max=100 default=none numeric) [if] [in] , [MODEL(string)]
3. di "`varlist'"
4. di "`model'"
5. end


. rtpcr pop gdp
pop gdp


. rtpcr pop gdp,model(junk)
pop gdp
junk

.

Works fine in both instances.


Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


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