The name is absent



18


Stata Technical Bulletin


STB-20


. xi: regress y i.agegrp*wgt

i.agegrp              Iagegr-l-4   (naturally coded; Irep78-1 omitted)

i.agegrp*wgt          IaXwgt-l-4   (coded as above)

(output fromregressappears)

is

. xi i.agegrp*wgt

i.agegrp              Iagegr.l-4   (naturally coded; Irep78.1 omitted)

i.agegrp*wgt          IaXwgt-l-4   (coded as above)

. regress y Iagegr* IaXwgt*

(output from regress appears)

Warnings

1. When you use xi, either as a prefix or a command by itself, xi first drops all previously created interaction variables—variables
starting with capital I. Do not name your variables starting with this letter.

2. xi creates new variables in your data; most are bytes but interactions with continuous variables will have the storage
type of the underlying continuous variable. You may get the message “no room to add more variables”. If so, you must
repartition memory; see [4] memory.

3. When using xi with an estimation command, you may get the message “matsize too small”. If so, see [5u] matsize.

ssi6


Routines to speed Monte Carlo experiments

William Gould, Stata Corporation, FAX 409-696-4601

The syntax of the post commands is

postfile varlist using filename [, every(#) replace ]
post
exp exp ... exp
postclos

These commands are utilities to assist Stata programmers in performing Monte Carlo type experiments. postfile declares the
variable and file names of a (new) Stata data set for containing results. post adds a new observation to the declared data set.
postclos declares an end to the posting of observations. All three commands manipulate the new results data without disturbing
the data in memory. After postclos, the new data set contains the posted results and may be loaded with use; see [5d] save.

Options

every (#) specifies how often posted results are to be written to disk. post attempts to be efficient by buffering results and
writing to disk only occasionally. every() should not be specified; the default value every(32)—23 for non-Intercooled
versions of Stata—is believed to be fastest. If every () is specified, it is taken as merely a suggestion; values that are too
large (larger than 208 for Intercooled and 23 for regular Stata) are treated as meaning every(32) and every(23).

replace indicates that the file specified (may) already exist and, if it does, postfile may erase the file and create a new one.

Remarks

Persons performing Monte Carlo experiments in Stata have, in the past, employed one of two programming approaches.
The first, originally suggested by Hamilton (1991), might be called the display-and-infile method. The basic idea is to start a
session log, display the results of the calculations on the screen (and therefore into the log), close the log, and read back the
results:

set more 1

log using filename

repeat {

draw a sample

make a calculation

display the results of the calculation
}
log close
infile the results previously displayed



More intriguing information

1. Urban Green Space Policies: Performance and Success Conditions in European Cities
2. The name is absent
3. Knowledge and Learning in Complex Urban Renewal Projects; Towards a Process Design
4. Connectionism, Analogicity and Mental Content
5. Pupils’ attitudes towards art teaching in primary school: an evaluation tool
6. CHANGING PRICES, CHANGING CIGARETTE CONSUMPTION
7. The name is absent
8. FOREIGN AGRICULTURAL SERVICE PROGRAMS AND FOREIGN RELATIONS
9. Credit Markets and the Propagation of Monetary Policy Shocks
10. TRADE NEGOTIATIONS AND THE FUTURE OF AMERICAN AGRICULTURE
11. SAEA EDITOR'S REPORT, FEBRUARY 1988
12. The name is absent
13. Outline of a new approach to the nature of mind
14. The name is absent
15. The name is absent
16. The Role of Trait Emotional Intelligence (El) in the Workplace.
17. Indirect Effects of Pesticide Regulation and the Food Quality Protection Act
18. IMPLICATIONS OF CHANGING AID PROGRAMS TO U.S. AGRICULTURE
19. Experimental Evidence of Risk Aversion in Consumer Markets: The Case of Beef Tenderness
20. What Lessons for Economic Development Can We Draw from the Champagne Fairs?