Hi,
I am trying to do the following. The command inequal7 is able to give various inequality measures for a sample. Now suppose that in my sample I make a distinction between low/medium/high education (0/1/2) and whether a person is married or not (0/1). The unit of observation is the individual. For a particular composite measure, I need to calculate the Mean Log Deviation (given by command inequal7 and stored in r(mld)) for each combination of education and married (so six in total). Once I have the six MLD values for each of the combinations, I need to take the weighted average to generate the final measure. As an example, medium education and married may occur 500 times in the dataset, while highly educated and not married may occur 200 times. I can manually calculate it using an IF statement, but if the set of combinations becomes really large, this becomes very time-consuming. Is there perhaps an easier solution to this?
Cheers.
Related Posts with Analysis on subset of dataset and aggregation
Creating group IDs for geospatial event dataI have a dataset of certain events that I want to analyze based off of location. At the most granula…
geoinpoly with self made coordinates fileHello, I have recorded the lat and lon coordinates for different rectangular areas. I have group th…
Survival analysis with lagged variableHi all, I am here to ask for your suggestions on how to run survival analysis with lagged variable.…
Creating a graph using xtline without connecting the data points. Shading some areas of the graphHello, I am trying to create a graph using the command xtline. The graph contains a line for the va…
bootstrap test.Dear All, I have this dataset Code: * Example generated by -dataex-. To install: ssc install datae…
Subscribe to:
Post Comments (Atom)
0 Response to Analysis on subset of dataset and aggregation
Post a Comment