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: Too many values error
From
Steve Nakoneshny <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: Too many values error
Date
Fri, 16 Mar 2012 11:26:26 -0600
I could be missing something obvious here, but wouldn't -bysort- help you out here?
Working from your initial code, a possible solution could be written thus:
bys factor: tab net_inc dips_inc if year == 2000, row
Steve
On 2012-03-16, at 10:38 AM, Pablo Bonilla wrote:
> Yes, you are right, it is variable with a lot of values. In my data
> base each obs in each year is an individual and the factor variable
> the population weight (expansion factor). What I want is the
> proportion of people in each combinations of categories of the two
> variables (net_inc and disp_inc) by row. Do you think there is a way
> or I have to do it in Excel ???
>
> Thanks, Eric.
>
> Best,
> PB
>
> On Fri, Mar 16, 2012 at 12:15 PM, Eric Booth <[email protected]> wrote:
>> <>
>>
>> This error means that one of your variables has too many values -- it's most likely 'factor' (I assume 'double' variable means it is stored as double format?). If you try -tab factor- you'll get the same result.
>>
>> 'factor' will need to be recoded into some manageable number of categories in order to include it in the -table-.
>>
>> If this is not the issue then please provide more information (at minimum, -describe- and -tabulate- your 3 variables of interest).
>>
>> - Eric
>>
>> __
>> Eric A. Booth
>> Public Policy Research Institute
>> Texas A&M University
>> [email protected]
>> +979.845.6754
>>
>> On Mar 16, 2012, at 10:49 AM, Pablo Bonilla wrote:
>>
>>> Dear Stata list,
>>>
>>> I need to produce a single table for each of the following years.
>>>
>>>
>>> year | Freq. Percent Cum.
>>> ------------+-----------------------------------
>>> 1992 | 63,180 11.47 11.47
>>> 1996 | 84,252 15.30 26.77
>>> 2000 | 60,648 11.01 37.78
>>> 2008 | 176,808 32.10 69.88
>>> 2010 | 165,930 30.12 100.00
>>> ------------+-----------------------------------
>>> Total | 550,818 100.00
>>>
>>>
>>> As you can see I do not have to many obs in each year but when I try
>>>
>>> table net_inc disp_inc factor if year == 2000, row
>>>
>>> I get
>>>
>>> too many values
>>> r(134);
>>>
>>>
>>> both net_inc and disp_inc are categorical variables of five
>>> categories each, and factor is a double variable. I wouldn't like to
>>> do this tables in Excel but for now is the only way that I find. Do
>>> you have any suggestions ????
>>>
>>> As always, thank you so much.
>>>
>>>
>>> Best,
>>> ----
>>>
>>> Pablo Bonilla
>>> *
>>> * 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/
>>
>>
>> *
>> * 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/
>
>
>
> --
> ----
>
> Pablo Bonilla
>
> *
> * 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/
*
* 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/