impute_user_se: Impute user survey data standard errors

View source: R/impute_se.R

impute_user_seR Documentation

Impute user survey data standard errors

Description

If a user provides data where standard error (SE) columns have missing values, the corresponding pre-calculated SE from UNPD data are used to impute the missing values. The imputation of UNPD survey data is described at the bottom of this document in the details section. Imputation of (SE) variables is carried out annually with UNPD survey data fit_fp_csub as [@Cahill et al 2017 (appendix page 16)]. The summary of this procedure is described below. There are two scenarios. Each scenario has a corresponding procedure.

1. (Completely missing) all entries missing for a coutnry's SE variable
2. (Partially missing) some entries missing for a country's SE variable

For scenario 1, the imputation is carried out by calculating the maximum of known sampling errors across all other countries and setting the unknown sampling errors equal to the median of these maximums. For scenario 2 we impute the sampling errors by setting them equal to the maximum of the known sampling errors in that country.

Usage

impute_user_se(user_data, subnational, is_in_union)

Arguments

user_data

‘Data.frame’ Survey data such as contraceptive_use.

subnational

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

is_in_union

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

Value

‘Data.frame’ Imputed survey data


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