knitr::opts_chunk$set(echo = TRUE)
knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file())
options(tinytex.verbose = TRUE)
# knitr::opts_knit$get("root.dir")  # alternative to the previous line
# the default autosave location will depend on this being setup
options(warn=-1)

1. Fit a one country model

library(fpemlocal)
fit <- fit_fp_c(
  division_numeric_code = 4,
  is_in_union = "Y",
  first_year = 1970,
  last_year = 2030
)

2. Calculate point estimates for indicators

results <- calc_fp_c(fit)

3. Plot estimates and survey data

plot_fp_c(
  fit,
  results,
  indicators = c(
    "contraceptive_use_modern"
    )
  )


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