Process World Marriage Data
data_ssvd_wmd.RdProcess marriage data downloaded from the UN Population Division's World Marriage Data, so it is ready to create a scaled SVD.
Usage
data_ssvd_wmd(file, n_comp = 5, status = c("current", "ever"), eps = 1e-05)Arguments
- file
Path to excel spreadsheet holding World Marriage Data
- n_comp
Number of SVD components to include in result. Default is
5.- status
"current"(the default) or"ever". Whether to report results for the marriage staus "currently married" or "ever-married". Note that both statuses include consensual and de facto unions, in addition to legal marriages.- eps
Parameter for truncating probabililities or rates. Default is
0.00001.
Usage
Step 1: Download data
Go to to page World Marriage Data.
Go to the data tab on the right. Download the most
recent excel spreadsheet (which as of October 2025 is called
undesa_pd_2019_wmd_marital_status.xlsx).
Step 2: Call function data_ssvd_wmd()
See also
coef_wmd()Obtain time series of SVD coefficients from World Marriage Datatidy_wmd()Format World Marriage Data into a tidy data frame.
Examples
file <- system.file(
"extdata",
"undesa_pd_2019_wmd_marital_status_subset.xlsx",
package = "bssvd"
)
coef_wmd(file)
#> # A tibble: 60 × 5
#> sex country time component coef
#> <chr> <chr> <int> <chr> <dbl>
#> 1 Female Afghanistan.2015 5 Component 1 1.03
#> 2 Female Albania 2000 Component 1 1.09
#> 3 Female Albania 2001 Component 1 -0.189
#> 4 Female Albania.2008 5 Component 1 0.339
#> 5 Female Albania 2011 Component 1 -1.22
#> 6 Female Albania.2017 5 Component 1 -1.05
#> 7 Female Afghanistan.2015 5 Component 2 1.88
#> 8 Female Albania 2000 Component 2 -0.0981
#> 9 Female Albania 2001 Component 2 0.185
#> 10 Female Albania.2008 5 Component 2 -0.356
#> # ℹ 50 more rows