I am using two data set, one contains data for children and another for woman. Now both data sets have key variables for Household id (HH) and person id (ln). Each id is unique, for example if an id has been provided to a female in a household it won't be assigned to any children in the children data set and vice versa. So, now i have merged these two data set, so now in the merged data set i only have women and children. Now the problem i facing is regarding children's primary caretaker variable. Each child is assigned a primary caretaker from the household child is living in. Now that caretaker can be male or female. How can i tell how many children have female caretaker? Is there any command which i can use to do something
bys HH: gen caretaker="female" if primary caretaker takes any of the value from female person id variable. I mean the number in the caretaker id, equals any number in the female person id variable, bys HH.
Related Posts with Generate
Panel data - first differences modelI am using panel data (world bank's world development indicators). Need to create a first difference…
Selecting the first variable without knowing it's nameHello all, I'm doing some big data cleaning for a lot of excel files, and I'm trying to figure out …
Matching firmsDear all, I am currently writing a code to capture the differences in earnings management between U…
how to compare the trend of risk ratios across age groups, between cases and controlsHi, I used binomial regression to calculate the risk ratio of outcomes (e.g. diabetes, renal failur…
Can't import 2011 India district shapefileWe need a 2011 India district shapefile (N=640 districts). I found a handful around the web (e.g., S…
Subscribe to:
Post Comments (Atom)
0 Response to Generate
Post a Comment