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

st: argument with digits after decimal point?

From   Dirk Enzmann <>
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'
* --------------------------

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
*   For searches and help try:

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