Hello. How do I calculate the percentage of persons over age 15 in each state who have income below 400% of the FPL using CPS data from 2000-2012? Essentially, I am asking how to construct an OFFPOV400 variable for these years for each state? Thanks for your assistance.
OFFPOV is created by comparing family income (OFFTOTVAL) to the poverty cutoff level (OFFCUTOFF). For your purposes, you will want to compare family incomes to the poverty cutoff level multiplied by 4, i.e. if OFFTOTVAL < (4 * OFFCUTOFF), then OFFPOV400 = “01: Below 400% of FPL.” You can then use the AGE and STATEFIP variables to restrict your sample to persons over age 15 and group by state. You will also need to weight your sample by WTSUPP in order to estimate official poverty rates.
Hope this helps.
Staff wrote:
"OFFPOV is created by comparing family income (OFFTOTVAL) to the poverty cutoff level (OFFCUTOFF). For your purposes, you will want to compare family incomes to the poverty cutoff level multiplied by 4, i.e. if OFFTOTVAL < (4 * OFFCUTOFF), then OFFPOV400 = “01: Below 400% of FPL.” You can then use the AGE and STATEFIP variables to restrict your sample to persons over age 15 and group by state. You will also need to weight your sample by WTSUPP in order to estimate official poverty rates."
When I use the syntax below I get an error saying “ERROR: A variable name can appear on the left side of an equal sign ONLY ONCE (except within an IF/ELSEIF/ELSE construction),” could you advise what I need to change to generate my new variable? Thank you.
My syntax:
offpov400 = (4 * offcutoff)
if (offtotalval lt (4 * offcutoff))
offpov400 = 1
else if (offtotalval ge (4 * offcutoff))
offpov400 = 0
You cannot define a variable (i.e. offpov400 = (4 * offcutoff)) and then redefine it later (i.e. offpov400 = 1) in your SDA expression, unless you are doing so within an if/else if/else construction like the 2 nd -4 th lines of your syntax. Therefore, you should delete the first line. Also, you need to correct the name of “offtotalval” to “offtotval”. Your final code should look like this:
if (offtotval lt (4 * offcutoff))
offpov400 = 1
else if (offtotval ge (4 * offcutoff))
offpov400 = 0
Hope this helps.
Thanks, Tim!