Hi all,
I have a dataset where individuals (i) are nested within work units comprised of other individuals (js). Each individual has a value for a particular attribute (e.g., age). Other members in their unit have their own values for the same attribute. A highly simplified illustration of the database structure is available on this Google Spreadsheet. In the real database, there is occasionally missing data, i.e., respondents do not indicate a value for a given attribute.
If possible, I need to use Stata to calculate: "the square root of the summed squared differences between an individual Si's value on a specific demographic variable and the value on the same variable for every other individual Sj in the sample for the work unit, divided by the total number of respondents in the unit (n)" (per Anne Tsui et al.'s 1992 ASQ: http://www.jstor.org/stable/2393472?...n_tab_contents). The equation form is available here.
I'm not sure how to accomplish this in Stata. I'm hoping someone has done something similar and can point me in the right direction.
Thank you.
I have a dataset where individuals (i) are nested within work units comprised of other individuals (js). Each individual has a value for a particular attribute (e.g., age). Other members in their unit have their own values for the same attribute. A highly simplified illustration of the database structure is available on this Google Spreadsheet. In the real database, there is occasionally missing data, i.e., respondents do not indicate a value for a given attribute.
If possible, I need to use Stata to calculate: "the square root of the summed squared differences between an individual Si's value on a specific demographic variable and the value on the same variable for every other individual Sj in the sample for the work unit, divided by the total number of respondents in the unit (n)" (per Anne Tsui et al.'s 1992 ASQ: http://www.jstor.org/stable/2393472?...n_tab_contents). The equation form is available here.
I'm not sure how to accomplish this in Stata. I'm hoping someone has done something similar and can point me in the right direction.
Thank you.
Comment