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: Preventing double counting


From   Christopher Baum <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re:st: Preventing double counting
Date   Thu, 8 Dec 2011 09:13:34 -0500

<>
On Dec 8, 2011, at 2:33 AM, Michael wrote:

> I have state-to-state migration data that is as follows:
> 
> orig_state	dest_state	netmigration
> 1		1		0	
> 2		1		25
> 3		1		.
> 1		2		-25
> 2		2		0
> 3		2		44
> 1		3		.
> 2		3		-44
> 3		3		0
> 
> 
> There is an origin state, a destination state, and net migration between the two. I don't want to double count net migration so I only want to keep a single observation for each state pair. Does anyone have any suggestions about how I could get rid of the second observation that gives me the negative net migration of the first observation?

to produce the 'lower triangle' (actually, subdiagonal) of the flows matrix,

keep if orig_state < dest_state

Kit

Kit Baum   |   Boston College Economics & DIW Berlin   |   http://ideas.repec.org/e/pba1.html
                             An Introduction to Stata Programming  |   http://www.stata-press.com/books/isp.html
  An Introduction to Modern Econometrics Using Stata  |   http://www.stata-press.com/books/imeus.html


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