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
Exporting variable label with putexcelHello, I'm exporting descriptive statistics using putexcel in Stata 14 and have been struggling to …
ARIMA goodness of fit / Auto-ARIMAHi, 1) Does STATA contain an 'auto-ARIMA' function (such as R, which uses the Hyndman-Khandakar alg…
FMM Class ProbabilitiesHello Stata experts: I have a large dataset for which I have run a FMM model. I have realized that …
Fill values in a seq forwards and backwards from a valueI'm using the following fake dataset for the current problem: Code: * Example generated by -data…
Gsem with logit dependent variableHello everyone, Our model is described as pic. convert is dummy variable Code: gsem (p1 p2 p3 &l…
Subscribe to:
Post Comments (Atom)
0 Response to a basic question about -if- programming command
Post a Comment