Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: creating networking effect, by using birthstate of migrant


From   "Ms. Marilyn Ibarra" <[email protected]>
To   [email protected]
Subject   st: creating networking effect, by using birthstate of migrant
Date   Mon, 18 Jun 2007 14:12:24 -0400 (EDT)

I have the following data:
Person    = observation
State     = the state person currently resides in
Born      = Birth state
95        = state where the person resided in 1995
Native    = if person lives in state where they resided 1995 
Immigrant = person does not lived in state where they resided in 1995
Return = person lived in USA in 1995

So what I need to do is create a variable that gives me the number of immigrants and return migrants to state k that were born in state i. 


Person State(k)  Born(i)  95   Native   Immigrant  Return
1         CO     CO      CO         1         0         0
2         NL     BC      BC         0         1         0  
3         DF     NL      QTO        0         1         0 
4         DF     JL      USA        0         1         1
5         CO     DF      DF         0         1         0 
6         NL     BC      BC         0         1         0

So where I would additionally have a variable network,  something like this: 

Person   Network
1           0 
2           2
3           1
4           1
5           1
6           2

Any ideas, what is the best way to construct this variable "network"?  

Thanks I appreciate any insight.

Marilyn. 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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