Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Identify and Replace Values


From   Abhimanyu Arora <[email protected]>
To   [email protected]
Subject   Re: st: Identify and Replace Values
Date   Mon, 12 Jul 2010 18:38:23 +0200

You can consider making use of -levelsof-  for each of your variables,
and a -foreach- loop


On Mon, Jul 12, 2010 at 6:18 PM, Hobst <[email protected]> wrote:
> Hello
>
> I have a huge dataset containing automotive brand-swiching data. I have a
> variable called traded_model and another variable called new_model. in order
> to output a symmetric swiching matrix i need to identify all the expressions
> that are eigther only in traded_brand or only in new_brand and replace the
> expression with "others". For example a model called "318d" exists in
> traded_model but not in new_model, so all the "318d" should be replaced by
> "others".
>
> Does anyone have an idea how i can programm that? I dont get it to work, and
> doing it manually is close to impossible as there are more than 1000
> different model names.
>
> Any help is much appreciated, thank you.
> --
> View this message in context: http://statalist.1588530.n2.nabble.com/Identify-and-Replace-Values-tp5283591p5283591.html
> Sent from the Statalist mailing list archive at Nabble.com.
> *
> *   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/
>

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index