Hi there,
Thanks in advance for your time.
I am programming a ado file which needs to calculate a sample-specific
default value (according to some formulae), when the user does not
specify the option. I am not quite sure how I should use the -syntax-
to do this because -syntax- requires a fixed default value.
For example, - example - won't work.
program define example,rclass
syntax varlist(max=2) [if] [in] [, option1(real)]
gettoken y 0: 0
gettoken x 0: 0
if "`option1'" == ""{
local option1=sum(y)/sum(x)
}
end
But how can I get around with this? Thank you very much.
Le
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Le Wang, Ph.D.
Minnesota Population Center
University of Minnesota
(o) 612-624-5818
*
* 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/