Hey great people!
Kindly assist me in the below. I am using KDHS 2022 and stuck in the month-by-month analysis of teenage births pre and post COVID-19.
Given b1_01 to b1_20 as month of birth and b2_01 to b2_20 as year of birth and v010 (respondent's year of birth), I intend to create the count of teenage births month-by-month to be able to show a twoway scatter graph and later on an event study model typical to the ones attached. In the twoway scatter for example, I would like to show the count of teenage births on the y-axis against the different months from Jan 2017 to July 2022 with only months Jan and July in a specific year indicated such that my 1st point shows Jan 2017, 2nd is July 2017, 3rd is Jan 2018 etc. And, I'd still like to show the other months as the connecting dots.
Kindly assist me in the below. I am using KDHS 2022 and stuck in the month-by-month analysis of teenage births pre and post COVID-19.
Given b1_01 to b1_20 as month of birth and b2_01 to b2_20 as year of birth and v010 (respondent's year of birth), I intend to create the count of teenage births month-by-month to be able to show a twoway scatter graph and later on an event study model typical to the ones attached. In the twoway scatter for example, I would like to show the count of teenage births on the y-axis against the different months from Jan 2017 to July 2022 with only months Jan and July in a specific year indicated such that my 1st point shows Jan 2017, 2nd is July 2017, 3rd is Jan 2018 etc. And, I'd still like to show the other months as the connecting dots.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input byte(b1_01 b1_02 b1_03 b1_04 b1_05) int(b2_01 b2_02 b2_03 b2_04 b2_05 v010) 8 12 10 6 . 2021 2013 2010 2009 . 1987 12 . . . . 2005 . . . . 1983 10 . . . . 2010 . . . . 1989 4 10 11 5 9 2019 2016 2009 2007 2002 1982 8 2 . . . 2016 2012 . . . 1992 6 6 11 . . 2017 2015 2012 . . 1993 7 7 7 . . 2013 2008 2008 . . 1985 7 5 . . . 2012 2009 . . . 1990 7 . . . . 2018 . . . . 1992 5 11 . . . 2006 1999 . . . 1982 12 12 . . . 2021 2019 . . . 1987 8 . . . . 2019 . . . . 1997 8 2 8 . . 2014 2008 2006 . . 1983 . . . . . . . . . . 2006 3 11 11 . . 2014 2010 1998 . . 1981 4 . . . . 2019 . . . . 1993 6 11 . . . 2014 2007 . . . 1983 10 8 3 . . 2015 2014 2013 . . 1989 11 8 8 . . 2013 2003 1996 . . 1978 5 . . . . 2012 . . . . 1990 7 9 . . . 2013 2006 . . . 1984 4 2 5 2 . 2020 2015 2013 2012 . 1995 10 11 12 4 . 2017 2014 2013 2011 . 1984 . . . . . . . . . . 1997 5 . . . . 2016 . . . . 1995 . . . . . . . . . . 1983 . . . . . . . . . . 1997 6 . . . . 2018 . . . . 1989 6 12 . . . 2019 2014 . . . 1995 11 . . . . 2018 . . . . 1994 9 . . . . 2021 . . . . 1994 8 6 . . . 2015 2003 . . . 1989 4 6 3 4 1 2022 2018 2016 2014 2013 1988 . . . . . . . . . . 2007 12 6 8 . . 2012 2009 2004 . . 1984 2 3 . . . 2020 2013 . . . 1992 6 . . . . 2003 . . . . 1984 1 . . . . 2019 . . . . 1995 3 3 1 . . 2014 2014 2007 . . 1985 7 5 9 6 . 2021 2017 2015 2006 . 1988 9 12 6 . . 2011 2008 2004 . . 1986 1 7 . . . 2022 2016 . . . 1995 4 9 . . . 2018 2015 . . . 1986 4 9 7 . . 2017 2012 2008 . . 1986 12 4 4 . . 2012 2010 2010 . . 1991 . . . . . . . . . . 2001 12 7 . . . 2006 1998 . . . 1975 . . . . . . . . . . 1998 . . . . . . . . . . 1994 5 6 . . . 2008 2003 . . . 1972 12 11 . . . 2018 2013 . . . 1989 . . . . . . . . . . 2003 . . . . . . . . . . 1997 7 12 7 10 . 2020 2008 2005 2003 . 1986 4 10 . . . 2020 2017 . . . 1997 1 3 2 11 7 2017 2011 2009 2006 2003 1976 7 4 . . . 2013 2012 . . . 1984 5 5 . . . 2021 2020 . . . 1996 1 4 4 9 . 2022 2017 2015 2012 . 1992 6 . . . . 2021 . . . . 1998 10 10 7 . . 2015 2010 2006 . . 1984 . . . . . . . . . . 2006 7 7 4 . . 2020 2020 2017 . . 1994 5 . . . . 2018 . . . . 1997 10 4 . . . 2021 2018 . . . 1990 4 . . . . 2016 . . . . 1992 5 3 . . . 2017 2013 . . . 1993 5 5 9 1 . 2019 2018 2014 2012 . 1989 5 . . . . 2021 . . . . 1998 6 12 . . . 2012 1997 . . . 1978 2 . . . . 2022 . . . . 1998 9 8 . . . 2012 2006 . . . 1982 8 8 . . . 2016 2012 . . . 1994 3 3 3 . . 2019 2014 2009 . . 1990 1 . . . . 2019 . . . . 1996 6 4 3 9 . 2016 2014 2012 2009 . 1992 5 8 5 . . 2021 2019 2013 . . 1992 4 . . . . 2017 . . . . 1994 8 5 11 11 5 2008 2005 2003 1995 1994 1980 10 2 3 4 8 2011 2007 2005 2003 2000 1979 5 . . . . 2022 . . . . 2000 . . . . . . . . . . 2005 5 4 . . . 2018 2016 . . . 1995 2 8 8 6 . 2020 2008 1998 1996 . 1975 . . . . . . . . . . 1996 2 . . . . 2021 . . . . 1995 12 1 6 . . 2019 2018 2016 . . 1996 1 2 11 . . 2013 2012 2000 . . 1981 . . . . . . . . . . 2000 10 12 11 8 . 2017 2000 1996 1992 . 1974 12 12 12 . . 2018 2015 2015 . . 1993 12 10 10 6 . 2018 2017 2011 2008 . 1990 9 12 8 . . 2020 2016 2014 . . 1996 6 6 7 . . 2013 2010 2006 . . 1988 10 6 6 9 12 2019 2013 2011 2009 2007 1987 11 . . . . 2002 . . . . 1981 11 . . . . 2014 . . . . 1997 . . . . . . . . . . 1996 10 . . . . 2020 . . . . 1992 3 8 . . . 2015 2005 . . . 1989 end
Comment