Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Too many values error


From   Pablo Bonilla <pablo.bonilla1234@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Too many values error
Date   Fri, 16 Mar 2012 15:02:19 -0400

Thank  you all,

Nick's solution is very close to what I need, as follows:

groups net_inc disp_inc if year == 2000 [ w = factor] , show(f p RP)

Best,

Pablo


On Fri, Mar 16, 2012 at 2:33 PM, Nick Cox <njcoxstata@gmail.com> wrote:
> -groups- (SSC) uses -list- as a basis for showing tables. The limits
> on tabulation don't apply.
>
> Nick
>
> On Fri, Mar 16, 2012 at 4:38 PM, Pablo Bonilla
> <pablo.bonilla1234@gmail.com> 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 ???
>
>
>  On Fri, Mar 16, 2012 at 12:15 PM, Eric Booth <eric.a.booth@gmail.com> 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).>>
>
> On Mar 16, 2012, at 10:49 AM, Pablo Bonilla wrote:
>
>>>> 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 ????
>
> *
> *   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/


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