Showing posts with label ESHRE. Show all posts
Showing posts with label ESHRE. Show all posts

Aug 20, 2015

Random graphs (52): Stacked bar graph


// Source:
// Kupka, Markus S., Anna Pia Ferraretti, Jacques De Mouzon, Karin Erb, Thomas
//     D'Hooghe, José Antonio Castilla, Carlos Calhaz-Jorge, Christian De
//     Geyter, Veerle Goossens, and the European IVF Monitoring Consortium for
//     the European Society of Human Reproduction and Embryology. 2014.
//     "Assisted Reproductive Technology in Europe, 2010. Results Generated from
//     European Registers by ESHRE." Human Reproduction 29(10):2099-2113. doi:
//     10.1093/humrep/deu175

clear
input str20 cntry ivf icsi fer pgd ed ivm for
"Belgium"  15.9 46.0 30.9 2.2 5.0 0.0 0.0 100.0
"Denmark"  41.6 35.1 21.1 0.8 1.4 0.0 0.0 100.0
"Germany"  15.3 56.2 28.6 0.0 0.0 0.0 0.0 100.0
"United Kingdom" 37.0 40.1 18.1 1.2 3.3 0.1 0.1 100.0
"Italy"   14.9 74.5 6.4 0.0 0.0 0.0 4.1 100.0
"Spain"   5.9 49.5 14.9 4.7 22.0 0.0 3.1 100.0
"Slovenia"  27.9 53.7 17.2 0.8 0.4 0.0 0.0 100.0
"Czech Republic" 15.4 49.6 22.9 2.4 9.7 0.0 0.0 100.0
end



graph hbar ivf icsi fer pgd ed for, over(cntry, sort(ivf) desc) stack ///
      legend(label(1 "IVF") label(2 "ICSI") label(3 "FER") ///
      label(4 "PGD") label(5 "ED") label(6 "FOR") pos(12) row(1)) ///
      ytitle("Percentage of all ART treatments, 2010") name(figure2, replace) ///
   scheme(lean1)

Random graphs (51): Bar graph


// Data from 
// de Mouzon, Jacques, Veerle Goossens, Siladitya Bhattacharya, José Antonio 
//     Castilla, Anna Pia Ferraretti, V. Korsak, Markus Kupka, Karl-Gösta 
//     Nygren, Anders Nyboe Andersen, and the European IVF Monitoring
//     Consortium for the European Society of Human Reproduction and Embryology.
//     2012. "Assisted Reproductive Technology in Europe, 2007. Results
//     Generated from European Registers by ESHRE." Human Reproduction 27(4):
//     954-966. doi: 10.1093/humrep/des023
// Ferraretti, Anna Pia, Veerle Goossens, Jacques de Mouzon, Siladitya 
//     Bhattacharya, José Antonio Castilla, Vladislav Korsak, Markus Kupka, Karl
//     G. Nygren, Anders Nyboe Andersen, and the European IVF Monitoring
//     Consortium for the European Society of Human Reproduction and Embryology.
//     2012. "Assisted Reproductive Technology in Europe, 2008. Results
//     Generated from European Registers by ESHRE." Human Reproduction 27(9):
//     2571-2584. doi: 10.1093/humrep/des255
// Ferraretti, Anna Pia, Veerle Goossens, Markus Kupka, Siladitya Bhattacharya,
//     Jacques De Mouzon, José Antonio Castilla, Karin Erb, Vladislav Korsak,
//     Anders Nyboe Andersen, and the European IVF Monitoring Consortium for the
//     European Society of Human Reproduction and Embryology. 2013. "Assisted
//     Reproductive Technology in Europe, 2009. Results Generated from European
//     Registers by ESHRE." Human Reproduction 28(9):2318-2331. doi:
//     10.1093/humrep/det278
// Kupka, Markus S., Anna Pia Ferraretti, Jacques De Mouzon, Karin Erb, Thomas
//     D'Hooghe, José Antonio Castilla, Carlos Calhaz-Jorge, Christian De
//     Geyter, Veerle Goossens, and the European IVF Monitoring Consortium for
//     the European Society of Human Reproduction and Embryology. 2014.
//     "Assisted Reproductive Technology in Europe, 2010. Results Generated from
//     European Registers by ESHRE." Human Reproduction 29(10):2099-2113. doi:
//     10.1093/humrep/deu175
// Always the two right-hands columns of Table 1
// "Cycles/million women 15–45 y" and "Cycles/million population"--Cycles of 
// IVF, ICSI, and FER


// Fix country variable
kountry cntry, from(other) stuck marker
ren  _ISO3N_ country
kountry country, from(iso3n) to(iso2c)
ren _ISO2C_ geo
drop country
ren cntry country
ren geo cntry
order cntry country
drop MARKER

// Fix string numbers
replace cycmio1545x2010 = subinstr(cycmio1545x2010, " ", "",.)  // Remove blank (thousands separator)
replace cycmio1545x2009 = subinstr(cycmio1545x2009, " ", "",.)  
replace cycmio1545x2008 = subinstr(cycmio1545x2008, " ", "",.)  
replace cycmio1545x2007 = subinstr(cycmio1545x2007, " ", "",.)  

destring cycmio1545x2010 cycmio1545x2009 cycmio1545x2008 cycmio1545x2007, replace
*list

// Turn data set around
reshape long cycmio1545x cycmio, i(cntry) j(year)
list, sepby(cntry)

// Cross-sectional bar graph at latest point in time
replace cycmio1545x = . if cntry == "DK" & year == 2010 // Get rid of dodgy DK 2010 value

by cntry: egen lastobs = max(cond(!missing(cycmio1545x), year, .))  // Identify year of latest observation
gen byte last = year == lastobs                            // ID variable of latest observation
// According to http://www.stata.com/support/faqs/data-management/first-and-last-occurrences/

graph hbar cycmio1545x if last == 1, over(country, sort(cycmio1545x) descending) nofill ///
      ytitle("ART cycles per million women age 15{c 150}45", size(medsmall)) ylabel(0(2500)15000, ang(45)) ///
      /*note("{it:Note:} Data refer to 2010 or latest available (no earlier than 2007)", span) */ ///
      name(figure1, replace) ysize(6.5) xsize(5.5) scheme(lean1)

// Figure 1: ART cycles per million women age 15–45 per country, 2010
// Sources: Ferraretti et al. (2012; 2013) and Kupka et al. (2014).
// Notes: Values for Albania, Estonia, Ireland, Lithuania, Poland, Spain, 
// Serbia, Switzerland, and Ukraine refer to 2008; for Croatia, Cyprus, France, 
// and Denmark to 2009.  ART cycles refer to IVF, ICSI, frozen embryo 
// replacement (thawings), preimplantation genetic diagnosis and screening, egg
// donation (donation cycles), in vitro maturation, and frozen oocyte
// replacement (thawings).

Jan 13, 2015

Random graphs (44): Small-multiples line plots

import excel "no of embryos transferred.xlsx", sheet("Tabelle1") firstrow clear

reshape long tot e1a e1p e2a e2p e3a e3p e4a e4p, i(country) j(year)

kountry country, from(other) stuck
ren _ISO3N_ ctry
kountry ctry, from(iso3n) to(iso2c)
drop ctry
ren _ISO2C_ cntry
replace cntry = "UK" if cntry == "GB"

order country cntry year tot e1a e2a e3a e4a e1p e2p e3p e4p
drop if cntry == "CY" | cntry == "EE" | cntry == "NL"
drop if cntry == "AL" | cntry == "BA" | cntry == "HR"
drop if cntry == "KZ" | cntry == "MD" | cntry == "RO"
drop if cntry == "UA" | cntry == "RS" | cntry == "TR"
drop if cntry == "ME" 

twoway (line e1p year, by(cntry, note("")) cmissing(no) lwidth(thick)) ///
       (line e2p e3p e4p year, by(cntry, note("{it:Sources:} ESHRE EIM reports, {it:Human Reproduction} 2001{c 150}2014", span)) cmissing(no)) ///
       , xlabel(1997 2000 2005 2010, ang(h)) xtitle("") ytitle("% of all transfers") ///
  legend(label(1 "1 embryo")  label(2 "2 embryos") ///
         label(3 "3 embryos") label(4 "4+ embryos") row(1))