Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Re: svmat is changing numbers - a rounding problem?


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Re: svmat is changing numbers - a rounding problem?
Date   Thu, 23 May 2013 08:24:58 +0100

You used the default of -svmat- but the full syntax is documented

 svmat [type] A [, names(col|eqcol|matcol|string)]

The key detail is [type]. Click on it in the help and you will get
further information.

You need to specify a -double- or -long- type, whichever is more
appropriate for your data.

Stata puts responsibility on the user when using -generate-  (which is
implicit here) to use the appropriate data type. Your data are too
large for -float-s to hold every digit accurately.

Nick
[email protected]

On 23 May 2013 08:12, Kasal Roman <[email protected]> wrote:
> Please, could you explain me why the svmat command changes numbers?
>
> just a simple example:
>
> "
> . mat A=19903011
>
> . clear
>
> . svmat A
> number of observations will be reset to 1
> Press any key to continue, or Break to abort
> obs was 0, now 1
>
> . di A1
> 19903012
> "
> Its a huge problem to me.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index