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]

st: AW: Problem with excluded observations with -ginidesc-


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: Problem with excluded observations with -ginidesc-
Date   Tue, 14 Sep 2010 16:42:38 +0200

<> 

So -ginidesc- is obtained from ssc via -ssc inst ginidesc-. 

The results with an -if- qualifier present are indeed strange. In the
absence of a fix, one can -preserve-/-restore- and -drop- to get around the
problem:


*************
sysuse auto, clear
ginidesc gear_ratio if rep78!=3, by(rep78)

preserve
	drop if rep78==3
	ginidesc gear_ratio, by(rep78)
restore
*************



HTH
Martin

-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Joe McCrary
Gesendet: Dienstag, 14. September 2010 16:19
An: Statalist; [email protected]; Amanda Hoffman
Betreff: st: Problem with excluded observations with -ginidesc-

Hi all.

I've been using -ginidesc- to develop inequality indices of
school-level measures for several districts in the U.S. My goal is to
be able to chart them longitudinally to see if enrollment policies
impacted the mixes of students (e.g., those eligible for free and
reduced-price meals (FRL)).

In 2003, one of the states did not report FRL data, so I wrote in a
statement to exclude those observations for that year:

. ginidesc  Pfrl03 if DistID~=3700720, by(DistID)

Gini Coefficient by subgroups
of DistID

----------------------
        K |     Gini_k
----------+-----------
   625690 |      0.337
  1201710 |      0.225
  3700720 |      0.274
----------------------
Stored in matrix


As you can see, even though I was excluding District 3700720, ginidesc
still reported results for it. Also, the numbers for the other
districts were way out of line with the years before and after 2003.
So since -ginidesc- calls -ineqdeco-, I then ran that to compute the
gini indices, which produced a table that makes more sense:

. ineqdeco Pfrl03 if DistID~=3700720, by(DistID)

Subgroup indices: GE_k(a) and Gini_k

----------------------------------------------------------------------
   DistID |     GE(-1)       GE(0)       GE(1)       GE(2)        Gini
----------+-----------------------------------------------------------
   625690 |    0.82561     0.24858     0.15316     0.14355     0.27361
  1201710 |    0.32468     0.21598     0.18285     0.18375     0.33745
  2503270 |    0.09620     0.08651     0.08126     0.07955     0.22489
  3700720 |
----------------------------------------------------------------------
 The Gini coefficients are consistent with those in the other years,
and 3700720 is excluded.

Anyone using -ginidesc- with subgroups, especially when there are
cases that are being excluded, should carefully check their results
against -ineqdeco-.



--
Joe McCrary
Senior Research Associate
WestEd-Atlanta
260 Peachtree St., Suite 2200
Atlanta, GA 30303

ph: 541-782-8626
fax: 404-393-3797

Skype: joe.mccrary
Google talk; joe.mccrary
**********************

"No problem can be solved from the same level of consciousness that created
it."
--Albert Einstein
*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index