I know what -if- -else- does, but what if there is a -if- but not the -else-?
For example:
if exp {
command (A1)
command (A2)
...
}
command (B1)
command (B2)
...
How is it executed? my guess is:
If exp=1, both (A1), (A2),... and (B1), (B2),... are executed;
if exp=0, then only commands (B1), (B2),... are executed;
I sort of know this is the case, but cannot find any official document to confirm.
For example, the official help file does not specify it about this particular case:
https://www.stata.com/manuals13/pif.pdf
Related Posts with a basic question about -if- programming command
Detrending in Dynamic Panel Data regressionHello, I am running a dynamic panel data regression. However 3 out of my 7 variables are stationary…
poisson regression (ppmlhdfe) with multiplicative errorIs there a way to force ppmlhdfe to use multiplicative error term instead of additive? I wan to run…
OLS vs FE vs RE? Tests results conflicts.Dear Stata specialists, Hope you can help me solve my problem. I recently run OLS, FE, RE for my p…
Help with two way fixed effect and event study?Hello, I'm currently working on a project where I asses whether or not a program has made an impact …
Creating a combined graphHi, I'm struggling to get this right. I have 2 variables that I want to show on a single graph. Fir…
Subscribe to:
Post Comments (Atom)
0 Response to a basic question about -if- programming command
Post a Comment