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

st: Re: appending two variables

From   Kit Baum <>
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

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:

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