hello everybody, I am new with Stata and I have a problem I am not able to solve also with the help of your precious forum.
I want to regress 2 variables: one about age (s2a_03) and another about the emplyment status (ocupado). Below the variables description:
This last variable is controversial for me becasue it is displayed to be in a numeric format, but the options are dummy: YES (Si) or NO (NO)
Now, the problem is that I need a subset with 2 criteria:
1. people aged higher than 7 and lower than 13 years old
2. the status of employment as YES (ocupado="Si")
No problems for the first one, as I run:
keep if (s2a_03>=7)
keep if (s2a_03<13)
Lot of problems with the second one, as I run:
keep if ocupado=="Si"
Result is: type mismatch r(109)
I have tried with a lot of other option (drop if, encode...). But I am getting crazy. Please if you can help me, it would be great.
Thank you in advance
I want to regress 2 variables: one about age (s2a_03) and another about the emplyment status (ocupado). Below the variables description:
storage display | value | |||||||||||||
variable | name type format | label | variable label | |||||||||||
s2a_03 | byte %8.0g | S2 3. �Cu�ntos | a�os | cumplidos | tiene?SI | TIENE | MENOS | DE | 1 | A�O | ANOTE | 00.SI | TIENE | 98 |
storage | display | value | |||
variable | name | type | format | label | variable label |
ocupado | byte | %8.0g | OCUPADO | Poblaci�n Ocupada |
Now, the problem is that I need a subset with 2 criteria:
1. people aged higher than 7 and lower than 13 years old
2. the status of employment as YES (ocupado="Si")
No problems for the first one, as I run:
keep if (s2a_03>=7)
keep if (s2a_03<13)
Lot of problems with the second one, as I run:
keep if ocupado=="Si"
Result is: type mismatch r(109)
I have tried with a lot of other option (drop if, encode...). But I am getting crazy. Please if you can help me, it would be great.
Thank you in advance
Comment