Hello, Im working with the following code:
You see how I have to list out the even numbers and odd numbers to tell stata how to act, I want to simply do something like this ( if `x' == even ) or ( if `x'==odd). How can I implement something like this?
Thanks,
Jad
Code:
forvalues x = 1/4 {
if `x' == 1 | `x'==3 {
local test "hello"
}
if `x' == 2 | `x'==4 {
local test "bye"
}
display "`test'"
}
Thanks,
Jad

Comment