Size: 1102
Comment:
|
← Revision 4 as of 2023-06-07 19:06:32 ⇥
Size: 1139
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
Stata commands store intermediary and final values. These can be useful for programming, so they are exposed in a variety of way. | Stata commands internally compute intermediary and final values. These can be useful for programming, so they are exposed as '''stored results'''. |
Line 13: | Line 13: |
The r() class stores results from general syntax commands. As an example: | The `r()` class stores results from general syntax commands. As an example: |
Line 20: | Line 20: |
Try `return list, all` to see all stored results available in the r() class. Leaving off the `all` option hides some results. | Try `return list, all` to see all stored results available in the `r()` class. Leaving off the `all` option hides some results. |
Line 27: | Line 27: |
The e() class stores results from estimations. | The `e()` class stores results from estimations. |
Line 29: | Line 29: |
Try `ereturn list, all` to see all stored results available in the e() class. Leaving off the `all` option hides some results. | Try `ereturn list, all` to see all stored results available in the `e()` class. Leaving off the `all` option hides some results. |
Line 37: | Line 37: |
The s() class stores results from parsing commands. | The `s()` class stores results from parsing commands. |
Line 39: | Line 39: |
Try `sreturn list` to see all stored results available in the s() class. | Try `sreturn list` to see all stored results available in the `s()` class. |
Line 47: | Line 47: |
The n() class stores results that don't belong in any of the r(), e(), or s() classes. | The `n()` class stores results that don't belong in any of the `r()`, `e()`, or `s()` classes. |
Stata Stored Results
Stata commands internally compute intermediary and final values. These can be useful for programming, so they are exposed as stored results.
R Class
The r() class stores results from general syntax commands. As an example:
count if EXPR local total=r(N)
Try return list, all to see all stored results available in the r() class. Leaving off the all option hides some results.
E Class
The e() class stores results from estimations.
Try ereturn list, all to see all stored results available in the e() class. Leaving off the all option hides some results.
S Class
The s() class stores results from parsing commands.
Try sreturn list to see all stored results available in the s() class.
N Class
The n() class stores results that don't belong in any of the r(), e(), or s() classes.
C Class
Not actually a class for stored results: see System Parameters.