Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: new problem with table display


From   "Richard Ohrvall" <richard.ohrvall@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: new problem with table display
Date   Wed, 31 Oct 2007 11:22:52 +0100

I have had the same problem as Jennifer when I was using a dataset
with populationweights for a population of approx. 10 millions. Since
I wanted to export the results to Excel I used the -parmby- command,
available on SSC, see -ssc desc parmest-, see also
http://www.cpc.unc.edu/services/computer/presentations/statatutorial/example27.html.
Depending on how you want to use your results, that could be solution.

However, it seems really strange that you can't get the results
without scientific notation. As shown in the example provided by
Marten, the figures becomes rounded and that is even more annoying.
Surely there most be a way to get the results without scientific
notation in the result window without using any ado-files, or?

Richard

On 10/30/07, Maarten buis <maartenbuis@yahoo.co.uk> wrote:
> > I had some variable values that were quite long (9905002006 for
> > example) that were showing up in scientific notation when I did
> > tab <variable> on them. I wanted them to not show up in scientific
> > notation and I wanted to be able to get a frequency table.
> >
> > A statalister suggested that the problem was not with tab command
> > display, but rather with the format of the variable. So, I changed
> > the format of the variable with:
> >
> > format <variable> %10.0f
> >
> > That resolved my problems then (thanks again).
> >
> > However, the example I gave you above is actually 1-2 digits longer
> > than the example that I posted and had resolved (so I had a 8 or 9
> > digit length variables before and used %8.0f and %9.0f and that
> > resolved things).
> >
> > Now that my numbers have gone up a placeholder, adjusting the
> > formatting to %10.0f doesn't work for the tab format. Oddly, with the
> > %10.0f formatting, I can list without values without scientific
> > notation, but if I do tab, it goes into scientific notation.
>
> I can reproduce that behavior, see the example below. One solution is
> Paul Bern's -bigtab- package, available on ssc (see: -ssc desc
> bigtab-).
>
> *------------- begin example ----------
> drop _all
> input double x
> 9905002005
> 9905002006
> end
> format x %10.0f
> tab x
> bigtab x
> *--------------- end example -----------
> (For more on how to use examples I sent to the Statalist, see
> http://home.fsw.vu.nl/m.buis/stata/exampleFAQ.html )
>
> Hope this helps,
> Maarten
>
> BTW. are you aware that your variable should be stored as a double? If
> you don't understand what I am talking about I strongly urge you to
> have a look at: http://www.ats.ucla.edu/stat/Stata/faq/longid.htm
>
>
>
> -----------------------------------------
> Maarten L. Buis
> Department of Social Research Methodology
> Vrije Universiteit Amsterdam
> Boelelaan 1081
> 1081 HV Amsterdam
> The Netherlands
>
> visiting address:
> Buitenveldertselaan 3 (Metropolitan), room Z434
>
> +31 20 5986715
>
> http://home.fsw.vu.nl/m.buis/
> -----------------------------------------
>
>
>      ___________________________________________________________
> Want ideas for reducing your carbon footprint? Visit Yahoo! For Good  http://uk.promotions.yahoo.com/forgood/environment.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/
>
*
*   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/



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