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
Stochastic Frontier analysis_ yearly estimation of inefficiencyDear Statalist, I am trying to calculate banking efficiencies using Cornwall et al.’s(1990) time va…
Match common values between different variablesHi Statalisters, I have a sample data and want to match values between different variables. Here ar…
Visual representation of cases and their contactsHello All, I have a dataset of individuals that were infected with a virus (one row for each indivi…
Plotting by subgroupsHi, I am Soma Gecse, an Economics student from Warwick University. With my group, we are investiga…
Problem of selecting observations from the collapsed sampleHi, I am working with the Health and Retirement Study and going to use the mean of observations acro…
Subscribe to:
Post Comments (Atom)
0 Response to If else loop in Stata
Post a Comment