{"id":45368988,"url":"https://github.com/cjabradshaw/humanfertility","last_synced_at":"2026-02-21T15:20:03.399Z","repository":{"id":135569008,"uuid":"403478560","full_name":"cjabradshaw/humanfertility","owner":"cjabradshaw","description":"R code to reproduce models testing for cross-national human fertility patterns relative to underlying drivers","archived":false,"fork":false,"pushed_at":"2025-02-18T12:43:38.000Z","size":5204,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-10T03:06:29.215Z","etag":null,"topics":["contraception","family-planning","family-planning-services","fertility","human-fertility","human-population","infant-mortality","mortality","population","religion","socio-economics"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cjabradshaw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-09-06T03:55:38.000Z","updated_at":"2025-02-18T12:43:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"257148ce-d63b-44b1-b7ea-042272160f89","html_url":"https://github.com/cjabradshaw/humanfertility","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/cjabradshaw/humanfertility","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjabradshaw%2Fhumanfertility","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjabradshaw%2Fhumanfertility/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjabradshaw%2Fhumanfertility/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjabradshaw%2Fhumanfertility/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cjabradshaw","download_url":"https://codeload.github.com/cjabradshaw/humanfertility/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjabradshaw%2Fhumanfertility/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29684392,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T14:31:22.911Z","status":"ssl_error","status_checked_at":"2026-02-21T14:31:22.570Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["contraception","family-planning","family-planning-services","fertility","human-fertility","human-population","infant-mortality","mortality","population","religion","socio-economics"],"created_at":"2026-02-21T15:20:02.701Z","updated_at":"2026-02-21T15:20:03.380Z","avatar_url":"https://github.com/cjabradshaw.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Human fertility models\n\n\u003ca href=\"https://doi.org/10.5281/zenodo.7496142\"\u003e\u003cimg src=\"https://zenodo.org/badge/DOI/10.5281/zenodo.7496142.svg\" alt=\"DOI\"\u003e\u003c/a\u003e\n\n\u003cimg align=\"right\" src=\"www/contraception.png\" alt=\"contraception\" width=\"200\" style=\"margin-top: 20px\"\u003e\n\n\u003ca href=\"https://cran.r-project.org\"\u003e\u003cem\u003eR\u003c/em\u003e\u003c/a\u003e code to reproduce models testing for cross-national human fertility patterns relative to underlying drivers\n\ncode updated December 2022\n\n\u003cem\u003eR\u003c/em\u003e code accompanies the following paper:\n\n\u003cstrong\u003e\u003ca href=\"https://globalecologyflinders.com/people/#DIRECTOR\"\u003eBradshaw, CJA\u003c/a\u003e, C Perry, \u003ca href=\"https://orcid.org/0000-0002-9948-1865\"\u003eM Judge\u003c/a\u003e, \u003ca href=\"https://www.linkedin.com/in/chitra-maharani-saraswati-6bab3510b?originalSubdomain=au\"\u003eCM Saraswati\u003c/a\u003e, \u003ca href=\"https://research-repository.uwa.edu.au/en/persons/jane-heyworth\"\u003eJ Heyworth\u003c/a\u003e, \u003ca href=\"https://research-repository.uwa.edu.au/en/persons/peter-le-souef\"\u003ePN Le Souëf\u003c/a\u003e\u003c/strong\u003e. 2023. \u003ca href=\"http://doi.org/10.1371/journal.pone.0280260\"\u003eLower infant mortality, lower household size, and more access to contraception reduce fertility in low- and middle-income nations\u003c/a\u003e. \u003cem\u003ePLoS One\u003c/em\u003e doi:10.1371/journal.pone.0280260  \n\nPre-print (out-of-date) also available \u003ca href=\"http://doi.org/10.1101/2021.12.16.21267946\"\u003ehere\u003c/a\u003e.\n\n## Abstract\nAlthough average contraceptive use has increased globally in recent decades, an estimated 222 million (26%) of women of child-bearing age worldwide face an unmet need for family planning — defined as a discrepancy between fertility preferences and contraception practice, or failing to translate desires to avoid pregnancy into preventative behaviours and practices. While many studies have reported relationships between availability/quality of contraception and family planning, infant mortality, and fertility, these relationships have not been evaluated quantitatively across a broad range of low- and middle-income countries. Using publicly available data from 64 low- and middle-income countries, we collated test and control variables in six themes: (\u003cem\u003ei\u003c/em\u003e) availability of family planning, (\u003cem\u003eii\u003c/em\u003e) quality of family planning, (\u003cem\u003eiii\u003c/em\u003e) female education, (\u003cem\u003eiv\u003c/em\u003e) religion, (\u003cem\u003ev\u003c/em\u003e) mortality, and (\u003cem\u003evi\u003c/em\u003e) socio-economic conditions. We predicted that higher nation-level availability/quality of family-planning services and female education reduce average fertility, whereas higher infant mortality, great household size (a proxy for population density), and religious adherence increase it. Given the sample size, we first constructed general linear models to test for relationships between fertility and the variables from each theme, from which we retained those with the highest explanatory power within a final general linear model set to determine the partial correlation of dominant test variables. We also applied boosted regression trees, generalised least-squares models, and generalised linear mixed-effects models to account for non-linearity and spatial autocorrelation. On average among all countries, we found the strongest associations between fertility and infant mortality, household size, and access to any form of contraception. Higher infant mortality and household size increased fertility, whereas greater access to any form of contraception decreased it fertility. Female education, home visitations by health workers, quality of family planning, and religious adherence all had weak, if any, explanatory power. Our models suggest that decreasing infant mortality, ensuring sufficient housing to reduce household size, and increasing access to contraception will have the greatest effect on decreasing global fertility. We thus provide new evidence that progressing the United Nation’s Sustainable Development Goals for reducing infant mortality can be accelerated by increasing access to family planning.  \n\n\u003cbr\u003e\nProf Corey J. A. Bradshaw \u003cbr\u003e\n\u003ca href=\"http://globalecologyflinders.com\" target=\"_blank\"\u003eGlobal Ecology\u003c/a\u003e | \u003cem\u003e\u003ca href=\"https://globalecologyflinders.com/partuyarta-ngadluku-wardli-kuu/\" target=\"_blank\"\u003ePartuyarta Ngadluku Wardli Kuu\u003c/a\u003e\u003c/em\u003e, \u003ca href=\"http://flinders.edu.au\" target=\"_blank\"\u003eFlinders University\u003c/a\u003e, Adelaide, Australia \u003cbr\u003e\nAugust 2022 \u003cbr\u003e\n\u003ca href=mailto:corey.bradshaw@flinders.edu.au\u003ee-mail\u003c/a\u003e \u003cbr\u003e\n\n## \u003ca href=\"https://github.com/cjabradshaw/humanfertility/tree/main/scripts\"\u003eScripts\u003c/a\u003e\n- main script \u003ccode\u003ehumanFertilityGitHubV3.R\u003c/code\u003e includes all data preparation and modelling steps\n- \u003ccode\u003enew_lmer_AIC_tables3.R\u003c/code\u003e (source file)\n- \u003ccode\u003er.squared.R\u003c/code\u003e (source file)\n\n## \u003ca href=\"https://github.com/cjabradshaw/humanfertility/tree/main/data\"\u003eData\u003c/a\u003e\nAll data sourced from the following online databases: (\u003cem\u003ei\u003c/em\u003e) \u003ca href=\"http://dhsprogram.com\"\u003eDemographic and Health Surveys\u003c/a\u003e, (\u003cem\u003eii\u003c/em\u003e) \u003ca href=\"http://track20.org/pages/data_analysis/policy/FPE.php\"\u003eFamily Planning Effort Index\u003c/a\u003e, (\u003cem\u003eiii\u003c/em\u003e) \u003ca href=\"http://mics.unicef.org\"\u003eMultiple Indicator Cluster Surveys\u003c/a\u003e, (\u003cem\u003eiv\u003c/em\u003e) \u003ca href=\"http://track20.org/pages/data_analysis/policy/NCIFP.php\"\u003eNational Composite Index on Family Planning\u003c/a\u003e, (\u003cem\u003ev\u003c/em\u003e) \u003ca href=\"http://data.worldbank.org\"\u003eWorld Bank\u003c/a\u003e, (\u003cem\u003evi\u003c/em\u003e) \u003ca href=\"http://wid.world/data\"\u003eWorld Inequality Database\u003c/a\u003e, and (\u003cem\u003evii\u003c/em\u003e) World Health Organization \u003ca href=\"http://who.int/data/gho\"\u003eGlobal Health Observatory\u003c/a\u003e, \u003ca href=\"http://www.thearda.com\"\u003eAssociation of Religion Data Archives\u003c/a\u003e.\n- \u003cstrong\u003ebasedata.update.csv\u003c/strong\u003e = \u003cem\u003emain input data\u003c/em\u003e\n- \u003cstrong\u003ematmort.update.csv\u003c/strong\u003e = \u003cem\u003ematernal mortality data\u003c/em\u003e\n- \u003cstrong\u003epop.yr.update.csv\u003c/strong\u003e = \u003cem\u003enational population data\u003c/em\u003e\n- \u003cstrong\u003econtinent.country2.csv\u003c/strong\u003e = \u003cem\u003enaming file necessary for data merging\u003c/em\u003e\n\n## Requires the following \u003cem\u003eR\u003c/em\u003e libraries\n\u003ccode\u003e\u003ca href=\"https://cran.r-project.org/web/packages/lme4/index.html\"\u003elme4\u003c/a\u003e\u003c/code\u003e, \u003ccode\u003e\u003ca href=\"https://cran.r-project.org/web/packages/Hmisc/index.html\"\u003eHmisc\u003c/a\u003e\u003c/code\u003e, \u003ccode\u003e\u003ca href=\"https://ggplot2.tidyverse.org/\"\u003eggplot2\u003c/a\u003e\u003c/code\u003e, \u003ccode\u003e\u003ca href=\"https://plotly.com/r/\"\u003eplotly\u003c/a\u003e\u003c/code\u003e, \u003ccode\u003e\u003ca href=\"https://cran.r-project.org/web/packages/nlme/index.html\"\u003enlme\u003c/a\u003e\u003c/code\u003e, \u003ccode\u003e\u003ca href=\"https://cran.r-project.org/web/packages/car/index.html\"\u003ecar\u003c/a\u003e\u003c/code\u003e, \u003ccode\u003e\u003ca href=\"https://cran.r-project.org/web/packages/dismo/index.html\"\u003edismo\u003c/a\u003e\u003c/code\u003e, \u003ccode\u003e\u003ca href=\"https://cran.r-project.org/web/packages/gbm/index.html\"\u003egbm\u003c/a\u003e\u003c/code\u003e, \u003ccode\u003e\u003ca href=\"https://cran.r-project.org/web/packages/rgeos/index.html\"\u003ergeos\u003c/a\u003e\u003c/code\u003e, \u003ccode\u003e\u003ca href=\"https://cran.r-project.org/web/packages/rworldmap/index.html\"\u003erworldmap\u003c/a\u003e\u003c/code\u003e, \u003ccode\u003e\u003ca href=\"https://cran.r-project.org/web/packages/rworldxtra/index.html\"\u003erworldxtra\u003c/a\u003e\u003c/code\u003e, \u003ccode\u003e\u003ca href=\"https://cran.r-project.org/web/packages/rcompanion/index.html\"\u003ercompanion\u003c/a\u003e\u003c/code\u003e, \u003ccode\u003e\u003ca href=\"https://cran.r-project.org/web/packages/SpatialEpi/index.html\"\u003eSpatialEpi\u003c/a\u003e\u003c/code\u003e, \u003ccode\u003e\u003ca href=\"https://cran.r-project.org/web/packages/ggridges/vignettes/introduction.html\"\u003eggridges\u003c/a\u003e\u003c/code\u003e, \u003ccode\u003e\u003ca href=\"https://cran.r-project.org/web/packages/dplyr/vignettes/dplyr.html\"\u003edplyr\u003c/a\u003e\u003c/code\u003e, \u003ccode\u003e\u003ca href=\"https://cran.r-project.org/web/packages/ggpubr/index.html\"\u003eggpubr\u003c/a\u003e\u003c/code\u003e, \u003ccode\u003e\u003ca href=\"https://cran.r-project.org/web/packages/plyr/index.html\"\u003eplyr\u003c/a\u003e\u003c/code\u003e, \u003ccode\u003e\u003ca href=\"https://cran.r-project.org/web/packages/fields/index.html\"\u003efields\u003c/a\u003e\u003c/code\u003e, \u003ccode\u003e\u003ca href=\"https://cran.r-project.org/web/packages/ncf/index.html\"\u003encf\u003c/a\u003e\u003c/code\u003e, \u003ccode\u003e\u003ca href=\"https://cran.r-project.org/web/packages/AICcmodavg/index.html\"\u003eAICcmodavg\u003c/a\u003e\u003c/code\u003e, \u003ccode\u003e\u003ca href=\"https://cran.r-project.org/web/packages/modEvA/index.html\"\u003emodEvA\u003c/a\u003e\u003c/code\u003e, \u003ccode\u003e\u003ca href=\"https://cran.r-project.org/web/packages/VIM/index.html\"\u003eVIM\u003c/a\u003e\u003c/code\u003e, \u003ccode\u003e\u003ca href=\"https://www.rdocumentation.org/packages/mice/versions/3.14.0/topics/mice\"\u003emice\u003c/a\u003e\u003c/code\u003e. \u003ccode\u003e\u003ca href=\"https://indrajeetpatil.github.io/ggstatsplot/\"\u003eggstatsplot\u003c/a\u003e\u003c/code\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cp\u003e\u003ca href=\"https://www.flinders.edu.au\"\u003e\u003cimg align=\"bottom-left\" src=\"www/Flinders_University_Logo_Horizontal_RGB_Master.png\" alt=\"Flinders University logo\" width=\"200\" style=\"margin-top: 20px\"\u003e\u003c/a\u003e \u0026nbsp; \u0026nbsp; \u003ca href=\"https://github.com/FutureChildHealth\"\u003e\u003cimg align=\"bottom-left\" src=\"https://github.com/cjabradshaw/humanfertility/blob/main/www/FCHlogoFinaltransp.png\" alt=\"Future Child Health logo\" width=\"200\" style=\"margin-top: 20px\"\u003e\u003c/a\u003e\n\u003ca href=\"https://globalecologyflinders.com\"\u003e\u003cimg align=\"bottom-left\" src=\"www/GEL Logo Kaurna New Transp.png\" alt=\"GEL logo\" width=\"180\" style=\"margin-top: 20px\"\u003e\u003c/a\u003e\u003ca href=\"https://www.uwa.edu.au\"\u003e\u003cimg align=\"bottom-left\" src=\"www/uwa2.png\" alt=\"UWA logo\" width=\"150\" style=\"margin-top: 20px\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcjabradshaw%2Fhumanfertility","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcjabradshaw%2Fhumanfertility","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcjabradshaw%2Fhumanfertility/lists"}