Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: How to use a vector in Stata


From   Etan Lakam <[email protected]>
To   [email protected]
Subject   st: How to use a vector in Stata
Date   Tue, 12 Jan 2010 12:51:37 +0000

Dear Listers,

I am trying to derive the socio-economic status variable for
participants in my data set approximately 1500 participants.
I  am using the used the NS-SEC method, in which the soco-economic
class of participants based on their occupation. The  English Office
of National Statistics that coined the method provided the attached
vector for the derivation.

In my dataset, I derived the empstsiz (employement status)  variable
based on the selfcoded occupation (occupation) variable given by
participants.
How should I proceed to derive their socio-economic class
(nssecfiveclass variable ) using the  vector ? Here is what I tried,
but it doesn't look right to me.

1- I  merged the data set  and the vector with the command : merge
empstsiz using ns-sec_self-code_vector.dta
The number of observation in my set is 1500 as it should be, but when
I compared the ocupation variable (occupation) in my data set and the
corresponding variable in teh vector file (selfcodedoccupation)  they
are only identical in 300 cases. I would have expected these to be the
same.

2- I also tried to join the dataset with the vector using: joinby
empstsize  using ns-sec_self-code_vector.dta.
I ended up with 10 times the (15000) number of obesrvation I am
suppose to have in my original dataset. The occupation  variable in my
dataset (occupation) and the occupation variable of the vector file
(selfcodedoccupation) matched in only 1441 instead of 1456 as it
should be (as I have 44 missing observations).

I am a bit confused.  Can somebody please direct me on how to use such
type of vector file to obtain the nssecfiveclass variable in my data?

Thank you in advance for the help
Etan
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index