[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
David Kantor <kantor.d@att.net> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Looking up values in a 2 dimensional table |

Date |
Thu, 17 Apr 2008 20:58:19 -0400 |

At 06:26 PM 4/17/2008, Mike Lacy wrote:

A colleague of mine has a data file with family income and family size for a large sample, with real family income for each of a series of years, in the wide format, e.g., something like:First, you probably mean Poverty Guideline.

famid FamSize1985 FamSize1987 FamSize1991 ... Inc1985 inc1987 Inc1991 ...

with family sizes and family incomes recorded for about 20 different year, not at fixed intervals.

He needs to create a poverty status indicator corresponding to each year, based on a 2 dimensional table giving poverty thresholds for each value of year and family size. All the ways I can imagine doing this seem relatively clumsy. (Among other things, I thought about ways of doing this with a matrix but they would require using the value of the family size variable as an index into the matrix, which is beyond my ken.)

I also considered something involving reshape and merge, but that seemed awkward as well.

Suggestions?

[...]

Poverty Guideline is a simple, rough calculation based on family size, income, and year.

Poverty Threshold is a more complex calculation that considers number of children and number of elderly in addition to the other factors. It is the "officially correct" measure, but is more complicated to compute.

Those are U.S. government standards. (USDA, I believe.)

I have ado files to calculate both of these. But for the threshold, it works for 1997 & 1998 only.

For the guideline, it does 1982-2007.

Either of them can be "filled in" to handled other years. (And BTW, the poverty guideline program uses a matrix.)

Write me privately if you want these. But note that there are no help files yet.

--David Kantor

kantor.d@att.net

*

* 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/

**References**:**st: Looking up values in a 2 dimensional table***From:*Mike Lacy <Michael.Lacy@colostate.edu>

- Prev by Date:
**Re: st: State-Space Models** - Next by Date:
**RE: st: gologit2** - Previous by thread:
**st: Looking up values in a 2 dimensional table** - Next by thread:
**Re: st: Looking up values in a 2 dimensional table** - Index(es):

© Copyright 1996–2015 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |