|  | 
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: unexpected "ambiguous abbreviation"
Does somebody have an idea why I receive the error message "mu ambiguous 
abbreviation" if the data contain variable starting with mu...? Below 
the result of trying to run my program "fitnb" with  - set trace on - 
and - set tracedepth 1 -.
I thought that using "tempvar mu" followed by "scalar mu = something" 
would result in mu being a temporary scalar (no macro!) existing only 
within the call of the program fitnb.
BTW, is there a possibility to check quietly the setting of varabbrev? 
So that I could use "set varabbrev off" at the beginning of the program 
and "set varabbrev on" at the end only if it has been "on" before (so 
that a call to the program will never change the setting "varabbrev" 
outside the program)? Because to use "set varabbrev off" is an effective 
workaround.
Thanks in advance,
Dirk
=====================================================================
fitnb rbinz99
----------------------------------------------------- begin fitnb ---
- version 9
- syntax [varlist] [, maxval(integer 0)]
- tokenize `varlist'
= tokenize rbinz99
- args x
- tempvar x_max size mu N prob i nbdat maxfit pmisfit
- if `maxval'==0 {
= if 0==0 {
- local selection "if `x'<."
= local selection "if rbinz99<."
- }
- else {
  local selection "if `x'<. & `x'<=`maxval'"
  }
- sum `x' `selection'
= sum rbinz99 if rbinz99<.
    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
     rbinz99 |      9081    .2542672    2.124223          0        150
- scalar x_max = r(max)
- quietly nbreg(`x') `selection'
= quietly nbreg(rbinz99) if rbinz99<.
- scalar size = 1/exp(_b[/lnalpha])
- scalar mu = exp(_b[_cons])
- scalar N = e(N)
- scalar prob = size/(size+mu)
mu ambiguous abbreviation
------------------------------------------------------- end fitnb ---
r(111);
=====================================================================
--
*************************************************
Dr. Dirk Enzmann
Institute of Criminal Sciences
Dept. of Criminology
Schlueterstr. 28
D-20146 Hamburg
Germany
phone: +49-(0)40-42838.7498 (office)
       +49-(0)40-42838.4591 (Mrs Billon)
fax:   +49-(0)40-42838.2344
email: [email protected]
www: 
http://www2.jura.uni-hamburg.de/instkrim/kriminologie/Mitarbeiter/Enzmann/Enzmann.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/