vignettes/paper_vignettes/all_women_paper.md

1. Fit models and obtain samples for all women

Obtaining results for all women entails running the in-union and not-in-union model. In this case, fit_fp_c returns a named list of fits.

library(fpemlocal)
fitlist <- fit_fp_c(
  is_in_union = "ALL",
  division_numeric_code = 4,
  first_year = 1970,
  last_year = 2030
)
fitlist %>% names
## [1] "Y"   "N"   "ALL"

2. Calculate point estimates for indicators

resultlist <- calc_fp_c(fitlist)
resultlist %>% names
## [1] "Y"   "N"   "ALL"

3. Plot the point estimates and survey data

plots <- plot_fp_c(
  fitlist,
  resultlist,
  indicators = c(
    "contraceptive_use_modern"
    )
  )
plots %>% names
## [1] "Y"   "N"   "ALL"
plots$ALL
## $contraceptive_use_modern



FPRgroup/FPEMcountry documentation built on April 24, 2023, 4:32 p.m.