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

st: Re: Replace for a group of variables


From   "Paolo Canino" <[email protected]>
To   <[email protected]>
Subject   st: Re: Replace for a group of variables
Date   Tue, 18 Nov 2003 14:27:04 +0100

try this:
for num -90005/-90001: mvencode svi*, mv(X)

if it doesn't work, try mvdecode instead (I never remeber wich is the right
one..)

bye.

Paolo

Paolo Canino
Istituto per la ricerca sociale
Via XX settembre, 24
20123 Milano
Italy
tel. +39.02.4676.4272
fax.+39.02.4676.4227
----- Original Message -----
From: "Enrico Pellizzoni" <[email protected]>
To: <[email protected]>
Sent: Tuesday, November 18, 2003 1:53 PM
Subject: st: Replace for a group of variables


> Dear Stata listers,
>
> Does anyone know how it is possible to execute this set of instruction in
a synthetic way?
>
> replace svi1001=. if svi1001==-90001 | svi1001==-90002 | svi1001==-90003 |
svi1001==-90004 | svi1001==-90005
> replace svi1002=. if svi1002==-90001 | svi1002==-90002 | svi1002==-90003 |
svi1002==-90004 | svi1002==-90005
> replace svi1003=. if svi1003==-90001 | svi1003==-90002 | svi1003==-90003 |
svi1003==-90004 | svi1003==-90005
> replace svi1004=. if svi1004==-90001 | svi1004==-90002 | svi1004==-90003 |
svi1004==-90004 | svi1004==-90005
> replace svi1005=. if svi1005==-90001 | svi1005==-90002 | svi1005==-90003 |
svi1005==-90004 | svi1005==-90005
> replace svi1006=. if svi1006==-90001 | svi1006==-90002 | svi1006==-90003 |
svi1006==-90004 | svi1006==-90005
> replace svi1007=. if svi1007==-90001 | svi1007==-90002 | svi1007==-90003 |
svi1007==-90004 | svi1007==-90005
> replace svi1008=. if svi1008==-90001 | svi1008==-90002 | svi1008==-90003 |
svi1008==-90004 | svi1008==-90005
> replace svi1009=. if svi1009==-90001 | svi1009==-90002 | svi1009==-90003 |
svi1009==-90004 | svi1009==-90005
> replace svi1010=. if svi1010==-90001 | svi1010==-90002 | svi1010==-90003 |
svi1010==-90004 | svi1010==-90005
> replace svi1011=. if svi1011==-90001 | svi1011==-90002 | svi1011==-90003 |
svi1011==-90004 | svi1011==-90005
> replace svi1012=. if svi1012==-90001 | svi1012==-90002 | svi1012==-90003 |
svi1012==-90004 | svi1012==-90005
> replace svi1013=. if svi1013==-90001 | svi1013==-90002 | svi1013==-90003 |
svi1013==-90004 | svi1013==-90005
> replace svi1014=. if svi1014==-90001 | svi1014==-90002 | svi1014==-90003 |
svi1014==-90004 | svi1014==-90005
>
> Thanks a lot
>
> Enrico
> ______________________________
>
>
> --------------------------------------------------------------------------
--
> L'utilizzo non  autorizzato  del  presente  messaggio  �  vietato  e
potrebbe costituire  reato. Se il presente
> messaggio non e' a Lei indirizzato, Le saremmo grati  se,  via  e-mail,
ne  comunicasse  l'errata  ricezione. Il
> contenuto del presente  messaggio  non deve essere considerato come
trasmesso o autorizzato da Borsa Italiana. Borsa
> Italiana non si assume alcuna responsabilit� per eventuali
intercettazioni, modifiche o danneggiamenti del presente
> messaggio e-mail.
>
> The unauthorized use of this e-mail is prohibited and could constitute an
offence. Please notify Borsa Italiana
> immediately by reply e-mail if you are not the intended recepient. The
contents of this message shall be understood as
> neither given nor endorsed by Borsa Italiana. Borsa Italiana does not
accept liability for corruption, interception or
> amendment, if any, or the consequences thereof.
> --------------------------------------------------------------------------
--
>
>
>
> *
> *   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/



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