Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: using information in value labels

From   "Quang Nguyen" <>
Subject   Re: st: using information in value labels
Date   Mon, 12 Feb 2007 17:00:28 -1000

Dear Alex,

Can you have a look at the _mvencode_ command? Also, you may fin dthe
following helpful:

Have A Great Day!

On 2/12/07, Alexander Nervedi <> wrote:

I have a complex survey dataset which has been helpfully cleaned - each
variable has its missing values coded with 9/99/999/999 or 98/998/9998 etc.
and things like Missing, Did not respond, refused to answer etc. are all
coded in as value labels.

I would like to treat all of these as missing and want to run a loop as

local allvars x1 ... x100

foreach var of local allvars{

  label list `var'
 *pseudo code follows
  scan label to see which levels include - "Missing", "missing", "did not
respond", etc
 for each level `i' {
     recode `var' (`i' = .)


I  was wondering if this is something that could be reasonably be


Laugh, share and connect with Windows Live Messenger

*   For searches and help try:

*   For searches and help try:

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