Dear all,
I am using a community-written command called duncan by Ben Jann.
I am trying to calculate the Duncan's dissimilarity index for each region in each year. I have individual data of people - their occupation, gender, region and year from the survey.
To get all the Duncan's values for each Region in each year I use:
This gives me all the indexes by region and year - but I don't know how to store this all as one variable. I read up the help sheet and it says that the value is stored in r(c) or something - but I'm not sure how I can create a variable which contains the index value for the observation depending on which region and Year that observation is from. When I type r(c) I only get the value for the latest Region Year value it runs.
Any help will be very much appreciated!
I am using a community-written command called duncan by Ben Jann.
I am trying to calculate the Duncan's dissimilarity index for each region in each year. I have individual data of people - their occupation, gender, region and year from the survey.
To get all the Duncan's values for each Region in each year I use:
Code:
by REGION SURVEYYEAR: duncan OCCUPATION GENDER
Any help will be very much appreciated!
Comment