I have a dataset of physicians working in different hospitals in different teams. A physician can work in different hospitals and different teams. Consider the simple example below where I have teams of physicians in two different hospitals. Physicians A and B work together in team 101 in hospital i while Physicians B and C work together in team 210 in hospital j.
Code:
clear
input str1 phy_id str1 hosp_id team_id
"A" "i" 101
"B" "i" 101
"B" "j" 210
"C" "j" 210
end
label var phy_id "physician id"
label var hosp_id "hospital id"
label var team_id "team id"
I want to construct a variable (phy_iv) for each physician that tells me with whom other physicians that work together with him/her have worked in other teams. For instance, for the first row I would like to know with whom physicians that work together with physician A in team 101 (e.g. physician B) have worked in other teams. Hence, the "value" for this variable should be "C" for row 1 and missing for every other row.
My dataset is much more complex than that (physicians may work in different teams within a hospital and teams may consist of more than 2 people). I am stuck on how to deal with this (I will have to construct more than one variable or add rows once I may have more than one physician who will have worked with other physicians who work with a given physician in a given team). So I guess it will be helpful to begin with a simple case.
Many thanks
Paula
0 Response to modelling "indirect" social networks
Post a Comment