Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Recoding strategy


From   "Jiang, Tao" <TJiang@air.org>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Recoding strategy
Date   Wed, 3 Jul 2002 15:24:05 -0400

xpose the data, for each new var, check if it has any repeated value, if
has, then sort it and replace it by _n, then xpose back.

Not sure if it is efficient

-----Original Message-----
From: Nick Winter [mailto:nwinter@policystudies.com]
Sent: Wednesday, July 03, 2002 2:58 PM
To: statalist@hsphsun2.harvard.edu
Subject: Recoding strategy


Hi-
Any thoughts on efficient ways to accomplish the following recoding task?

I've got six variables, wherein respondents ranked the importance of each of
six strategies.  For the vast majority of cases, respondents assigned one
rank of "1", one of "2" and so on.

Some respondents, however, ranked more than one strategy with the same rank.
This takes many forms: some gave two ranks of "1", then one of "3", "4",
"5", and "6".  Others gave two ranks of "1", then one of "2" through "5" but
no "6".  Others gave more than two of the same rank to different items, etc.

We want to do the following to produce a fully consistent set of rankings:

For multiple identical rankings, randomly order them, and then rank
subsequent ranks sequentially from there.  So, for example, if the data look
like this for two cases:

       S1 S2 S3 S4 S5 S6
        1  1  2  3  4  5
        3  1  1  4  5  6

I would want to change it to:

       S1 S2 S3 S4 S5 S6
        1  2  3  4  5  6
        3  1  2  4  5  6

That is, for the first case, S1 was randomly chosen to be kept as one and S2
as two; and the remaining ranks ordered from there.  Similarly for the
second case.

Any thoughts?

I should say, in closing, that I did not decide on this approach, so while I
would certainly enjoy any commentary on why it's a bad idea, I will need to
implement it regardless...

Thanks
Nick W.


-----------------------------------------------------------
 Nicholas Winter, Ph.D.                     P 202.939.5343
 Policy Studies Associates                  F 202.939.5732
 1718 Connecticut Avenue, NW     nwinter@policystudies.com
 Washington, DC 20009-1148           www.policystudies.com
----------------------------------------------------------- 
*
*   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/



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