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: ratio of family income to poverty
From
Nick Cox <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: ratio of family income to poverty
Date
Tue, 8 Apr 2014 23:59:15 +0100
Assuming that you have variables -income-, -poverty- this could be e.g.
gen ratio = cond(missing(income, poverty), ., min(3, floor(income/poverty)))
or
gen ratio = floor(income/poverty)
replace ratio = 3 if inrange(ratio, 4, .)
Nick
[email protected]
On 8 April 2014 23:28, Dianne Devine <[email protected]> wrote:
>
> Dear Statalist
>
> I have a list of 'ratio of family income to poverty’ ranging from 0-5 and
> would like to generate the following Stata
>
> 0/0.99 = < 1.0
> 1/1.99 = ≥1.0 to < 2.0
> 2/2.99 = ≥2.0 to < 3.0
> 3/5 =≥3.0
>
> I keep getting error messages unfortunately when I try to generate.
>
> Thank you in advance of your valuable help!
>
> Dianne
>
>
>
>
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/