Statalist


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

st: argument with digits after decimal point?


From   Dirk Enzmann <[email protected]>
To   [email protected]
Subject   st: argument with digits after decimal point?
Date   Fri, 01 Jan 2010 01:46:18 +0100

Why does the following program not work as intended?

* --------------------------
program define test
  syntax [, ci(real 95)]
  set level `ci'
end
* --------------------------

It is an example of a program that allows the optional argument "ci" to specify the confidence level (the default should be 95). It works as intended as long as I don't specify "ci" with digits after the decimal point. But if I do, for example

* --------------------------
test, ci(99.9)
* --------------------------

I receive the error message "level() can have at most two digits after the decimal point". What am I doing wrong, i.e. how can I avoid this problem?

***************************
Dirk Enzmann
[email protected]
*
*   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/



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