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
Adding Number of Observations Label to Stacked Bar ChartHi all, I'm trying to make a stacked bar chart that shows the number of observations within each gr…
creating table following multiple imputation with svy suiteHello. Is it possible to create tables using "collect" series of commands using mi estimate:svy, su…
Calculate economic significance for censored (Tobit) regression with multiple imputationHi, I'm trying to calculate economic significance from a censored (Tobit) regression with multiple …
Computing a cumulative scoreHi, I have the following sample of data. I have an indicator of 1 and 0 in once column and I want t…
Dates in StataI am trying convert some dates in quarters. I am doing this by going into the variables manager and …
Subscribe to:
Post Comments (Atom)
0 Response to a basic question about -if- programming command
Post a Comment