ano_nac is the year the birth occured
- Years range from 2010-2019 (if it is relevant to anyone)
- Provinces are coded 1-32.
- Age ranges from 9-18 (I'm interested in seeing number of births for mothers under the age of 18).
- Does anyone know of a code I could use to convert the numeric coded values of provinces (prov_nac) to list the actual province name. So for example, instead of an observation having a 1 under this variable it would name the actual province (e.g. Districto Nacional).
- Does anyone know how I can create variables to collapse the number of observations. So instead of each observation referencing a particular birth (as it does now), an observation would reflect the number of births underwent by a mother of a particular age (let's say 17) born in a particular province in a particular year? Does this make sense? I can try to explain a bit further if people have questions.
Dataset example here:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int ano_nac byte(prov_nac edama) 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2011 1 18 2011 1 18 2010 1 18 2011 1 18 2011 1 18 2010 1 18 2010 1 18 2011 1 18 2011 1 18 2010 1 18 2010 1 18 2011 1 18 2010 1 18 2010 1 18 2010 1 18 2011 1 18 2011 1 18 2011 1 18 2011 1 18 2011 1 18 2010 1 18 2011 1 18 2011 1 18 2011 1 18 2011 1 18 2011 1 18 2011 1 18 2011 1 18 2011 1 18 2011 1 18 2011 1 18 2011 1 18 2011 1 18 2011 1 18 2011 1 18 2010 1 18 2011 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 18 2010 1 17 2010 1 17 2010 1 17 2010 1 17 2010 1 17 2010 1 17 2010 1 17 2010 1 17 2010 1 17 2010 1 17 2010 1 17 2010 1 17 2010 1 17 2010 1 17 2011 1 18 2011 1 18 2012 1 18 2011 1 18 end
0 Response to Help generating variables incorporating multiple conditions
Post a Comment