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

st: RE: numerous histograms -> too many values -- r(1001)


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: numerous histograms -> too many values -- r(1001)
Date   Mon, 24 Feb 2003 16:52:53 -0000

Daniel M�ller
>
> 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?

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.

Nick
[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