Hi,
I wrote a code like
if x=="x1"|x=="x2" {
replace z=y
replace a=b
}
However, it did not work. I do not know what is wrong with it. Most of the answer I have found use if in for loop, but it should work alone as well, isn't it?
Can you please help!!
Thank you so much.
(Sorry for the basic stuff)
Related Posts with If else loop in Stata
Predictive margins for interactionsDear stata Community, The question is about the difference between the results of the following meth…
Shading in GraphsI am trying to plot a single time series on a graph, with dates on the x axis. I would like to shade…
command arpios is unrecognized r(199);I installed the arpois command for use. But, after executing my code, arpios sdm viocrim q23, r ar(1…
Converting Numeric to String without changes the numbers.How can I change ID numbers "11222333 11222334 11122245" to string variables without them being chan…
Change last 4 digits in String type How can I change last 4 digits of co_end_variable to finyear ? For the data below, for example, 01…
Subscribe to:
Post Comments (Atom)
0 Response to If else loop in Stata
Post a Comment