do_1country_run: Run one country model

Description Usage Arguments Value References Examples

View source: R/do_1country_run.R

Description

Runs the family planning estimation model and returns samples and bias adjusted observations for respective run.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
do_1country_run(
  is_in_union = "Y",
  surveydata_filepath = NULL,
  service_stats = FALSE,
  service_stats_filepath = NULL,
  division_numeric_code,
  first_year = NULL,
  last_year,
  subnational = FALSE
)

Arguments

is_in_union

‘Character’ "Y" if women are in union.

surveydata_filepath

‘Character’ If NULL package data is used

service_stats

‘Logical’ If FALSE service statistics are not used. Service stats are not public. Requires FPcounts/fpemservicestat package

service_stats_filepath

‘Character’If NULL private package data is used. Requires FPcounts/fpemservicestat package

division_numeric_code

‘Numeric’ A number associated with the country. See the data from fpemdata::divisions

first_year

‘Numeric’ The first year of model estimates in output. The model will be fit to all data, including dates before this date if available

last_year

‘Numeric’ The last year of model estimates in output. The model will be fit to all data, including dates after this date if available

subnational

'‘Logical’ If FALSE runs the national model

Value

‘List’

  1. posterior_samples ‘Numeric array’ An array of samples of dimension chains x samples x years x proportions

  2. core_data ‘Data.frame’ The processed data associated with the model run from fpemmodeling::core_data

References

https://github.com/FPcounts/FPEM

Examples

1
See the reposiotry url in references for detailed examples

FPRgroup/fpemmodeling documentation built on April 8, 2020, 12:32 p.m.