Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st:


From   [email protected] (Jeff Pitblado, Stata Corp.)
To   [email protected]
Subject   Re: st:
Date   Mon, 24 Feb 2003 12:33:43 -0600

Daniel M�ller <[email protected]> runs into a problem when
trying to generate histograms for several variables:

> I am plotting several variables to observe their
> distributions. That works
> well until graph number 23. Then I get below error message
> (I am using Stata8/SE, WinXP). Here's the code:
>
> -----------start---
> . local vars "yiwrice3 ires32 iwealth3a xhhcred3 loganpk
> logarice year2
> xethn3 secon3 logtravayr3 logcd_com logcd_dis avil aayr
> herovil xhhric3
> xhh2wrice3 aaricehh3 xhh05ha3 logirri_ha logirriXyear2
> xhhmai3 logximtot32
> xhhsell3 logxhhhepa"
>
> . tokenize vars
>
> . foreach var of local vars {
>   2.         histogram `var', bin(10) frequency normal
> name(`var', replace)
>   3. }
>
> (bin=10, start=100, width=65)
> <omitted>
> (bin=10, start=.42857143, width=.05357143)
> too many sersets
> too many values
> r(1001);
> -----------end---
>
> If I delete the variable where I get the error, Stata still
> only produces 23
> graphs.
> There are only 100 obs in the data. r(1001) tells that 'You
> have attempted
> to create a table that has too many rows or columns.' I
> thought the max
> number of rows and cols is unlimited in Stata SE. What is
> wrong here?

Nick Cox <[email protected]> then writes:

> I wouldn't pay too much attention to the precise diagnostic. I guess r(1001)
> is overloaded here.  The remedy, I think, is to insert -discard- as the last
> line of the -foreach- loop, to dump each serset.

Daniel has hit an internal limit for graphs: the maximum number of sersets.
Each graph contains at least one serset; basically a serset is set of data
series that are being plotted.

FYI:  The -histogram- command with the -normal- option creates 2 serset.

If Daniel is going to be managing many graphs (more than 15, say), I would
recommend using the saving() option to save the graphs to disk.

        histogram `var', bin(10) frequency normal sav(`var', replace)
						  ^^^

This way Daniel can look at a particular graph sometime later without having
to rerun -histogram-.


--Jeff
[email protected]
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index