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
A collection of Stata dataviz packagesDear all, I am starting this thread to post updates about my various dataviz packages. I also regu…
Command does not work on Do-file, but can work on command boxI have a command that I cannot run from do file, but if I copy paste to the Command box, it returns …
Issue with teffects IPWRA-I am hoping someone can help with this, I am using the following code with a hospital administrative…
Year Month From Numeric VariableI want to reformat a time series variable. Code: * Example generated by -dataex-. For more info, ty…
Probit or Random effect probitHello everyone. I wish you could help me. I am studying the effect of gender on business failure. I …
Subscribe to:
Post Comments (Atom)
0 Response to If else loop in Stata
Post a Comment