fit_fp_c: Fit one country model

View source: R/fit_fp_c.R

fit_fp_cR Documentation

Fit one country model

Description

Fits the family planning estimation model and returns samples and bias adjusted observations for respective run. Please see fit_fp_csub for additional argument default settings

Usage

fit_fp_c(population_data = NULL, is_in_union, ...)

Arguments

population_data

‘Data.frame’ Population count data such as population_counts.

is_in_union

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

division_numeric_code

‘Numeric’ A number associated with the country. See the data from 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.

surveydata_filepath

‘Character’ Path to survey data. Survey data should be a .csv with the following format contraceptive_use.

service_stats_filepath

‘Character’

subnational

'‘Logical’ If TRUE runs the sub national model.

diagnostic

'‘Logical’ If TRUE saves the full jags output.

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 core_data.

References

https://github.com/FPcounts/FPEM

Examples

See the reposiotry url in references for detailed examples

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