Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: AW: Re: Identify and Replace Values


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: Re: Identify and Replace Values
Date   Tue, 13 Jul 2010 13:14:42 +0200

<> 



" What are you doing with this inp str10"



-input- is intended to create a fake dataset, so we can replicate your
problem.



"Does anybody see a reason why i always get the "0 real changes made" for
the
last two commands?"


-inlist()- expects the arguments for comparison as comma-separated which
"others" is not... See Bill`s little -program- in
http://www.stata-journal.com/article.html?article=dm0049 on how to change
that...



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Hobst
Gesendet: Dienstag, 13. Juli 2010 12:59
An: statalist@hsphsun2.harvard.edu
Betreff: st: Re: Identify and Replace Values

I dont get that one.. What are you doing with this inp str10? But anyways i
have already renamed all the Model Names, so i am still working with the
following code:

levelsof traded_model, local(traded)
levelsof new_model, local(new)
local onlytraded : list traded - new
local onlynew : list new - traded
local others : list onlynew | onlytraded
replace traded_model="others" if inlist(traded_model,"`others'")
replace new_model   ="others" if inlist(new_model,"`others'")

Does anybody see a reason why i always get the "0 real changes made" for the
last two commands? Is there a mistake in the syntax somewhere, i dont see
the problem. I think there must be something wrong with lines 3-5, i cant
find the error.....
Thank you..

-- 
View this message in context:
http://statalist.1588530.n2.nabble.com/Identify-and-Replace-Values-tp5283591
p5286941.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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index