Bookmark and Share

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: AW: Problem with xi (Stata 11)


From   Steve Samuels <[email protected]>
To   [email protected]
Subject   Re: st: AW: Problem with xi (Stata 11)
Date   Wed, 2 Jun 2010 09:31:56 -0400

Works in Stata 11 for me, too (Mac OS X 10.5.8).  Perhaps a fresh
install of Stata from the CD and license, followed by an single update
to the latest version will help.

Steve

On Wed, Jun 2, 2010 at 9:11 AM, Martin Weiss <[email protected]> wrote:
>
> <>
>
> Strangely, I get the correct result in Stata 11:
>
>
>
>   Country |
>      code |      COUNTRY==56
>   3-digit |         0          1 |     Total
> -----------+----------------------+----------
>        40 |     4,927          0 |     4,927
>        56 |         0      8,857 |     8,857
>       203 |     5,932          0 |     5,932
>       208 |     4,532          0 |     4,532
>       233 |     4,865          0 |     4,865
>       246 |     4,714          0 |     4,714
>       250 |     4,716          0 |     4,716
>       276 |     4,891          0 |     4,891
>       300 |     4,873          0 |     4,873
>       348 |     4,490          0 |     4,490
>       372 |     4,585          0 |     4,585
>       380 |    21,773          0 |    21,773
> -----------+----------------------+----------
>     Total |    70,298      8,857 |    79,155
>
>
> What happens after a restart of Stata for you?
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Walter
> Garcia-Fontes
> Gesendet: Mittwoch, 2. Juni 2010 15:07
> An: [email protected]
> Betreff: Re: st: AW: Problem with xi (Stata 11)
>
> * Martin Weiss [02/06/10 15:00]:
>> This code produces consistent results for me:
>>
>> *************
>> webuse set http://puna.upf.edu
>> webuse data/data.dta
>> xi i.COUNTRY
>> ta COUNTRY  _ICOUNTRY_56, nol
>> *************
>
> This is what I get:
>
> . ta COUNTRY _ICOUNTRY_56, nol
>
>   Country |
>      code |      COUNTRY==56
>   3-digit |         0          1 |     Total
> -----------+----------------------+----------
>        40 |     4,927          0 |     4,927
>        56 |       265      8,592 |     8,857
>       203 |     5,932          0 |     5,932
>       208 |     4,532          0 |     4,532
>       233 |     4,865          0 |     4,865
>       246 |     4,714          0 |     4,714
>       250 |     4,716          0 |     4,716
>       276 |     4,891          0 |     4,891
>       300 |     4,873          0 |     4,873
>       348 |     4,490          0 |     4,490
>       372 |     4,444        141 |     4,585
>       380 |    21,773          0 |    21,773
> -----------+----------------------+----------
>     Total |    70,422      8,733 |    79,155
>
> See the 0's in 56 and the ones in 372 that shouldn't be there.
>
> Now that you said I tried it from another machine with stata 10 and I
> get the right results.
>
> Is "xi" deprecated in Stata 11?
>
> Walter
>
>>
>>
>> HTH
>> Martin
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: [email protected]
>> [mailto:[email protected]] Im Auftrag von Walter
>> Garcia-Fontes
>> Gesendet: Mittwoch, 2. Juni 2010 14:47
>> An: Statalist
>> Betreff: st: Problem with xi (Stata 11)
>>
>> I have a problem with the "xi" command in Stata 11 (completely updated
>> as of today). I tried to create a dataset as simple as possible to
>> reproduce the problem, which can be accessed from my server. In the
>> dataset there is a single variable called COUNTRY with numeric codes
>> for each country and labels identifying the country.
>>
>> There are 12 different values for COUNTRY (12 different countries) and
>> 79155 observations with a variable number of observations for each
> country.
>> To reproduce:
>>
>> webuse set http://puna.upf.edu
>> webuse data/data.dta
>> xi i.COUNTRY
>>
>> Stata creates variables _ICOUNTRY_n as it should, where n are the
>> different codes for the 12 countries, omitting the country with the
>> smallest code.
>>
>> The problem is that some of the values of _ICOUNTRY are 0 when they
>> shouldn't be, for instance I have cases where _ICOUNTRY_56 = 0 but
>> COUNTRY = 56. This happens randomly for a few cases and I've looked at
>> it from all angles but couldn't figure out what is going on.
>>
>> If I reduce the number of variables or the number of observations the
>> problem  disappears at some point, can't tell exactly when, so I'm
>> providing the smallest example I could build.
>>
>> Walter
>>
>
> --
> Walter Garcia-Fontes
> mailto: [email protected] - http://puna.upf.edu
> Departament d'Economia i Empresa - http://www.econ.upf.edu
> Universitat Pompeu Fabra
> Ramon Trias Fargas 25-27, 08005 Barcelona, Spain
> Tel. +34 93 542 2722 - Fax. +34 93 542 1746
>
> *
> *   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/
>



-- 
Steven Samuels
[email protected]
18 Cantine's Island
Saugerties NY 12477
USA
Voice: 845-246-0774
Fax:    206-202-4783

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index