Package: measuringreligiouschange 1.0.2

Michał Bożek

measuringreligiouschange: Demographic projections of religious groups

Measuringreligiouschange is a package developed by the Center for Advanced Studies of Population and Religion (CASPAR) for a joint project with the Pew Research Center as part of the Pew-Templeton Global Religious Futures project. The software package can generate religious group population projections at the global, regional and national level resulting from initial age-sex composition of populations, demographic processes (fertility, mortality and migration) and religious processes (transmission of religion between generations and religious switching). The package is a flexible tool that can be used to numerically reproduce the projections presented in the Pew Research Center report “The Future of World Religions: Population Growth Projections, 2020-2070”, generate other projection variants based on the included input data, or create projections from user-supplied input data and adjustments to demographic and religious processes. This package may be most useful for users with training in demographic analysis and some experience using and programming in R. For inquiries, please contact: [email protected].

Authors:Michał Bożek [aut, cre], Krzysztof Kiecoń [aut], Marcin Stonawski [aut]

measuringreligiouschange_1.0.2.tar.gz
measuringreligiouschange_1.0.2.zip(r-4.7-any)measuringreligiouschange_1.0.2.zip(r-4.6-any)measuringreligiouschange_1.0.2.zip(r-4.5-any)
measuringreligiouschange_1.0.2.tgz(r-4.6-any)measuringreligiouschange_1.0.2.tgz(r-4.5-any)
measuringreligiouschange_1.0.2.tar.gz(r-4.7-any)measuringreligiouschange_1.0.2.tar.gz(r-4.6-any)
measuringreligiouschange_1.0.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
measuringreligiouschange/json (API)

# Install 'measuringreligiouschange' in R:
install.packages('measuringreligiouschange', repos = c('https://caspar-pl.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/caspar-pl/measuringreligiouschange/issues

Pkgdown/docs site:https://caspar-pl.github.io

Datasets:

On CRAN:

Conda:

3.30 score 12 exports 31 dependencies

Last updated from:038bd40349 (on v1.0.2). Checks:7 NOTE, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develNOTE886
source / vignettesOK231
linux-releaseNOTE716
macos-releaseNOTE676
macos-oldrelNOTE667
windows-develNOTE770
windows-releaseNOTE602
windows-oldrelNOTE834
wasm-releaseOK97

Exports:base_object_generatorcreate_country_listcreate_projection_objectcreate_region_listprojectsave_csv_allsave_plots_allsave_plots_comparative_allsave_plots_comparative_regions_allsave_plots_regions_alltest_object_generatorvariants_loader

Dependencies:clicpp11crayondata.tabledplyrfarvergenericsggplot2gluegridExtragtablehmsisobandlabelinglifecyclemagrittrpillarpkgconfigprettyunitsprogressR6RColorBrewerrlangS7scalestibbletidyselectutf8vctrsviridisLitewithr

Conducting an MRC Projection
1 Create a country list — create_country_list() | 2 Assemble a projection — create_projection_object() + variants_loader() | 3 Run the projection — project() | 4 Convenience helpers | base_object_generator() | test_object_generator()

Last update: 2026-11-18
Started: 2026-11-18

Exporting Projection Results
save_csv_all() | Files controlled by demographic_files | 1 · projection_structure_data.csv | 2 · projection_deaths_data.csv | 3 · projection_births_data.csv | 4 · projection_asfr_data.csv | 5 · projection_fertility_exposure_data.csv | 6 · projection_fertility_differentials.csv | Files controlled by switching_files | 7 · projection_switchers_data.csv | 8 · projection_switching_matrices.csv | Files controlled by migration_files | 9 · projection_emigration_data.csv | 10 · projection_immigration_data.csv

Last update: 2026-11-18
Started: 2026-11-18

Inner Workings
1 Object structure | Country_object | Projection_object | 2 The loader — Loader.R | base_data_list slot reference | Processing pipeline inside create_country_list() | migration_limit_check() | country_info_adjustment() | structure_data_adjustment() | object_loader() | error_check() | Country-list ownership lock | 3 Switching decomposition — switching_matrix_creator() | Algorithm | 4 Main procedure — dem_proj_no_mig() | Partitioned switching (switching_type = 1) | Non-partitioned (switching_type = 2) | 5 Fertility factorisation — fertility_step() | Shared input | Path A — combined factorisation (combined_fertility_factorization = TRUE) | Path B — per-age-group factorisation (combined_fertility_factorization = FALSE) | 6 Full single step — project() | Migration = FALSE | Migration = TRUE

Last update: 2026-11-18
Started: 2026-11-18

Visualising MRC Projection Results
1 Country-level plots — save_plots_all() | Plot variants by flag | Example output — USA (code 840) | 2 Region-level plots — save_plots_regions_all() | 3 Comparative plots — plot_comparative() and save_plots_comparative_all() | plot_comparative() — single plot, returned as a ggplot object | save_plots_comparative_all() — saves all types for every country | Comparative plot types by flag | Example output — USA, normal vs no-differential fertility

Last update: 2026-11-18
Started: 2026-11-18

Readme and manuals

Help Manual

Help pageTopics
default data listbase_data_list
Generate main Pew scenariosbase_object_generator
Reference Class representing a country as Country_objectCountry_object Country_object-class
Loading data and creating list of Country_objectscreate_country_list
Creating projection_objectcreate_projection_object
Creating list of Region_objectscreate_region_list
Age-Specific Fertility Rates datasetdata_asfr
Sex ratio at birth datasetdata_births_ratio
Fertility differentials datasetdata_fertility_differentials
Migration destination matrices dataset.data_migration_destination
Out-migration rates datasetdata_migration_rates
Population datasetdata_population
Regions datasetdata_regions
Population structure datasetdata_structure
Survival rates (nSx) datasetdata_survivability
religion switching datasetdata_switching
Scenario variants settings datasetinfo_variants
Conducting MRC projectionproject
A reference class containing data and parameters needed for projection.Projection_object Projection_object-class
Reference Class representing a region as Region_objectRegion_object Region_object-class
Saving projection results to CSV filessave_csv_all
Creating and saving projection results plots to PDF filessave_plots_all
Saving country comparative plots to .pdf file(s)save_plots_comparative_all
Saving region comparative plots to .pdf file(s)save_plots_comparative_regions_all
Creating and saving region projection results plots to PDF filessave_plots_regions_all
Generate a 3-country test projectiontest_object_generator
Calculate variant and create modified country_list_objectvariants_loader