do_qualitychecks: Wrapper for Performing Age-Sex Male-Female Data Quality...

Description Usage Arguments Value See Also Examples

View source: R/QualityMethods.R

Description

Wrapper for Performing Age-Sex Male-Female Data Quality Checks

Usage

1
2
3
4
5
6
7
do_qualitychecks(
  XY,
  XX,
  fn = c("sexRatioScore", "ageSexAccuracy", "ageSexAccuracyDasGupta"),
  verbose = TRUE,
  ...
)

Arguments

XY

Input data for male population. UN format.

XX

Input data for female population. UN format.

fn

Method to be called from DemoTools. Available aternatives: "sexRatioScore", "ageSexAccuracy", "ageSexAccuracyDasGupta".

verbose

Logical value. If TRUE messages are printed as the method is applied. Set verbose = FALSE to silent the function.

...

Other arguments to be passed on to other methods and functions.

Value

A data.frame having the same number of columns as input data. Different numbers of rows. UN format.

See Also

sexRatioScore, ageSexAccuracy, ageSexAccuracyDasGupta.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
M5 <- DDSQLtools.data$Pop5_Egypt_M_DB
F5 <- DDSQLtools.data$Pop5_Egypt_F_DB

Q1 <- do_qualitychecks(M5, F5, fn = "sexRatioScore")
Q2 <- do_qualitychecks(M5, F5, fn = "ageSexAccuracy")
Q3 <- do_qualitychecks(M5, F5, fn = "ageSexAccuracyDasGupta")

select_columns <- c("AgeID", "AgeStart", "AgeMid", "AgeEnd", "AgeLabel",
                    "DataTypeName", "DataTypeID", "DataValue")
Q <- rbind(Q1, Q2, Q3)
Q[, select_columns]

timriffe/DDSQLtools documentation built on Oct. 6, 2021, 5:34 p.m.