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: long table
From
Argyn Kuketayev <[email protected]>
To
[email protected]
Subject
Re: st: long table
Date
Tue, 14 Jun 2011 21:47:31 -0400
you need a cartesian product. i don;t know if this is the best
approach, but i would create a new constant variable in both files:
gen c=1
then perform
merge m:m c
On Tue, Jun 14, 2011 at 8:06 PM, <[email protected]> wrote:
> I use Stata/MP 11 for Windows.
>
> Suppose dataset A contains variable a of two elements 1 and 2.
> Dataset B contains variable b of three elements -3, -4 and -5.
>
> What is the Stata command to create the dataset that contains the
> following two columns
>
> 1 -3
> 1 -4
> 1 -5
> 2 -3
> 2 -4
> 2 -5
>
> ?
>
> Thanks very much for the help.
>
> Ning
> *
> * 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/
>
--
Argyn Kuketayev
*
* 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/