| Previous: How do I know | Up: Frequently Asked Questions | Next: How can I set |
setx mean /* sets all x's to their means */
setx x1 x1[7] /* resets x1 to value in 7th observation */
will set all the x's equal to their means, and then set x1 equal to
the value of x1 that appears in the 7th observation of the dataset.
If you wanted to get results for each x1 in your dataset, you could
write a little loop, such as:
setx mean /* set all x's to their mean levels */
local i 1 /* create a counter that runs from 1 to */
while `i' <= _N { /* _N, where _N is the # of observations */
setx x1 x1[`i'] /* set x1 to the value in the ith obs */
simqi /* simulate quantity of interest */
local i = `i' + 1 /* repeat for other observations */
}