For Richard:
SS2=1: if SS1=1 and that member have children (children are identified
like rel=3) or partner (civil=1). This value will represent those with
social security and with dependants.
SS2=2: if rel=3 and SS1=1 and age>=10. This value will represent people
greater or equal to 10 years who adquire social security by their own (not
for their fathers). They are insured with no dependants.
Thanks!
Rodrigo Brice�o
-----Mensaje original-----
De: [email protected]
[mailto:[email protected]]En nombre de Richard
Goldstein
Enviado el: Jueves, Enero 30, 2003 03:30 PM
Para: [email protected]
Asunto: Re: st: Construct a new variable
I think you need to do a little more with the
definitions; it appears that any case with SS1=1
and rel=3 and age>=10 qualifies for both SS2=1 AND
SS2=2 -- which do you want it to be?
Rich Goldstein
"Rodrigo Brice�o" wrote:
>
> Dear Stata Users: I need some assistance in the construction of a new
> variable. I really don't know how to construct it, because the sintaxis is
a
> little complex for my knowledge of Stata. I will thank a lot everybody who
> can help me. Lets take an Example:
>
> Household MN SEX AGE REL CIVIL SS1 SS2
> 1001008021 1 1 37 1 1 1 1
> 1001008021 2 2 32 2 1 . 3
> 1001008021 3 1 12 3 6 .
> 1001008021 4 1 5 3 6 . 4
> 1001008031 1 2 42 1 1 . 3
> 1001008031 2 2 25 2 1 1 1
> 1001008031 3 2 18 3 6 1 2
> 1001008031 4 2 20 3 6 1 2
> 1001008031 5 1 4 3 6 1 2
>
> I want to generate the variable SS2 with those values. The logic is the
> next:
>
> 1. SS2 will have an 1 if SS1=1 and if the person in that household is
> married or have sons (civil=1 or if the person have dependants: rel=3).
> 2. SS2 wil have a 2 if SS1=1 and if the person if a son (rel=3) and
age>=10.
> 3. SS2 will have a 3 if rel=1 or rel=2 have SS1=1, and SS1 for this person
> is missing. We are trying to assign values to the husbands or wifes whose
> partner have SS=1.
> 4. SS2 will have a 4 if reljefe=1 or 2, SS=1 (for any of them or both) and
> they have chldren less or equal to 5 (rel=3 and age<=5).
>
> Thanks for your precious time
>
> Rodrigo
>
> *
> * 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/
*
* 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/
*
* 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/