![]() |
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?
[...]
© Copyright 1996–2025 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |