Statalist


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

Re: st: orthogonal pairing of observations


From   Michael McCulloch <[email protected]>
To   [email protected]
Subject   Re: st: orthogonal pairing of observations
Date   Mon, 19 Oct 2009 21:52:22 -0700

Thanks Stas, I created this simple example to show that -joinby- does  
exactly what I intended:

***************
clear
set obs 3
gen a = _n

gen group=1
list
save a, replace
clear
set obs 3
gen b="a"
replace b="b" in 2
replace b="c" in 3
gen group=1
list
joinby group using a.dta
sort a b
list a b group
***************

On Oct 19, 2009, at 4:57 PM, Stas Kolenikov wrote:

> Have you looked at -joinby-?
>
> On Mon, Oct 19, 2009 at 6:33 PM, Michael McCulloch
> <[email protected]> wrote:
>> I'm seeking to create an orthogonal pairing of two sets of  
>> observations
>> I've read the help for -orthog-, hoping it could do this, but I  
>> don't need
>> to create the polynomial.
>>
>> An example using the auto dataset is, if in a separate dataset I  
>> created
>> records for four drivers, and then wanted to create records of  
>> matched sets
>> where each driver got the opportunity to drive each car.
>>
>> clear
>> set obs 4
>> gen driver = _n
>> tab driver
>> save mydrivers.dta, replace
>>
>> I'm seeking advice on how to achieve something like this:
>>        * merge the two datasets, auto.dta and mydrivers.dta,  
>> creating in the
>> process that orthogonal pairing
>>
>>
>>
>> Michael McCulloch
>> Pine Street Foundation
>> 124 Pine Street
>> San Anselmo, CA 94960-2674
>> tel:    415-407-1357
>> fax:    206-338-2391
>> [email protected]
>>
>>
>>
>>
>>
>>
>>
>> *
>> *   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/
>>
>
>
>
> -- 
> Stas Kolenikov, also found at http://stas.kolenikov.name
> Small print: I use this email account for mailing lists only.
>
> *
> *   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/



Michael McCulloch
Pine Street Foundation
124 Pine Street
San Anselmo, CA 94960-2674
tel:	415-407-1357
fax: 	206-338-2391
[email protected]









*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index