Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Matching observations

From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Matching observations
Date   Fri, 8 Jul 2005 18:35:27 +0100

Check out the FAQ at 

How do I produce a dataset based on all possible 
pairs of identifiers within each group?

[email protected] 

Sen Kunal Dr
> This may seem like a simple question, but I am a beginner in STATA:
> I have observations on individuals for various cities. I would like to
> transform my data such that I generate pairs from all 
> possible combinations
> of individuals for each city. So if there are 4 individuals 
> for a particular
> city, I have 6 pairs (AB, but ruling out BA). How do I do this?
> Then I would like to generate a dummy which takes the value 
> one if the pair
> satisfies a particular condition (both individuals have 
> arrived in the city
> from a particular region outside the city), zero otherwise. 
> How can I do this?

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index