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: long table


From   Maarten Buis <[email protected]>
To   [email protected]
Subject   Re: st: long table
Date   Wed, 15 Jun 2011 09:10:20 +0200

An alternative is to use the -cross- command, see -help cross- and
Charles H. Franklin (2006) "Stata tip 29: For all times and all
places", The Stata Journal, 6(1): 147-148.
http://www.stata-journal.com/article.html?article=dm0020

Hope this helps,
Maarten

--- On Wed, Jun 15, 2011 at 3:47 AM, Argyn Kuketayev wrote:
> 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

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany


http://www.maartenbuis.nl
--------------------------

*
*   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