Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: appending two variables


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: Re: appending two variables
Date   Sat, 20 Nov 2004 09:38:30 -0500

Why not just use postfile? Stata will then automatically put whatever you specify into a new Stata dataset, which can readily be analyzed, combined with your original data, whatever you want.

Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html




David K Evans wrote:

So I want to run 10,000 iterations of a process, but I'm not using Stata
SE, so I can't put more than 800 iterations in a given column of a matrix.

The problem is that if I want to do summary statistics, on the different
estimates, I would normally just use svmat to turn the matrix into a
variable and then 'summarize' that.

Is there any way to take two variables, say X and Y, and put them end to
end (ultimately creating a dataset that has 10,000 observations, where
each observation is an outcome).

- ----------------------------------------------------------------------- -----
Joseph responded

I'm not quite sure that I follow you, but you can use a -tempfile- to save
the first batch, create the second batch, and use -append- to put them
together end-to-end, -save , replace- back to the temporary file, and
continue until your iterations are done. (Illustrated below.)
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index