Statalist


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

Re: st: What is an integer for Stata?


From   Stas Kolenikov <[email protected]>
To   [email protected]
Subject   Re: st: What is an integer for Stata?
Date   Wed, 7 Oct 2009 23:35:46 -0500

. confirm integer number 1e4
'1e4' found where integer expected
r(7);

. confirm integer number 1e+4
'1e+4' found where integer expected
r(7);

Looks like a real number to me. A double, probably.

On 10/7/09, Sergiy Radyakin <[email protected]> wrote:
> Dear All,
>
>  how to explain this?
>
>         version 10.1
>         . display 1e+04
>         10000
>         . capture confirm number 1e+04
>         . display _rc
>         0
>         capture assert mod(1e+04,1)==0
>         . display _rc
>         0
>         . clear
>         . set obs 10000
>         obs was 0, now 10000
>         . set obs 1e+04
>         '1e+04' found where integer expected
>         r(198);
>
>  So what is an integer then? (or what is 1e+04 if not an integer?)
>
>  Link to help reference: http://www.stata.com/help.cgi?obs
>
>  Thank you,
>
>      Sergiy Radyakin
>  *
>  *   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/
>


-- 
Stas Kolenikov, also found at http://stas.kolenikov.name
Small print: I use this email account for mailing lists only.
*
*   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