Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: saving a varlist in a new dat file


From   Alan Neustadtl <[email protected]>
To   [email protected]
Subject   Re: st: saving a varlist in a new dat file
Date   Sun, 4 Mar 2012 08:36:13 -0500

It sounds like either -append- or -merge- could produce the dataset
you are interested in.  The difference is that append creates a "long"
form dataset and merge creates a "short" form dataset.  You can use
the -reshape- command to convert from one form to the other.

The help file and pdf documentation has lots of great examples and it
is worth your time to consult them.

If you use -append- you will need to create an variable identifying
the sample for the data.  In long form each variable would represent a
different sample.

If your samples can have different number of cases, I think -append-
would be easier and more useful.  But, you didn't specify how you
wanted to compare your samples and that will be important in deciding
on the forr of your dataset.

Best,
Alan

On Sun, Mar 4, 2012 at 4:59 AM, Osei Kuffour Wiafe <[email protected]> wrote:
> Hi guys,
>
> I hope this is possible to do in stata and someone is able to help me out.
>
> I'm taking samples of some data and I have use of just one variable
> from the analysis, say varY.
> I need to save this varY in a new .dat file, run the the do file
> several times again and save the
> different varYs in the same created file. I need to compare the
> different varY values from different samples and I'm
> hoping to save them in one dat file to make it easy to analyse.
>
> Can anyone help me with such a code for my work?
>
> Thanks!
> Osei
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index