Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: Combining and repeating value from another dataset


From   Rahber Thariani <thariani@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Combining and repeating value from another dataset
Date   Sat, 13 Apr 2013 22:19:55 -0700

Hi All,

A question to which I am sure there is a simple answer, but as a novice in Stata, one I am having a hard time finding.

I have a dataset with variables a, b, c and d (stored in X.dta). There are about 5000 observations.

In another dataset I have only variable e(stored in Y.dta). There is only one observation.

I want to create a composite dataset with variables a, b, c, d and e. I wish to repeat the same value of e 5,000 times in my new dataset for each of the existing 5,000 observations of a, b, c, and d.

What do you suggest to create this structure?

Thanks,

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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index