SimulationFunc: SimulationFunc

Description Usage Arguments Value

View source: R/utils.R

Description

Function to simulate SII range through random sampling of the indicator value for each quantile, based on the associated mean and standard error

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
SimulationFunc(
  data,
  value,
  value_type = 0,
  se,
  repeats = 1e+05,
  confidence = 0.95,
  multiplier = 1,
  sqrt_a,
  b_sqrt_a,
  rii = FALSE,
  reliability_stat = FALSE
)

Arguments

data

data.frame containing the data to calculate SII confidence limits from; unquoted string; no default

value

field name within data that contains the indicator value; unquoted string; no default

value_type

indicates the indicator type (1 = rate, 2 = proportion, 0 = other); integer; default 0

se

field name within data that contains the standard error of the indicator value; unquoted string; no default

repeats

number of random samples to perform to return confidence interval of SII; numeric; default 100,000

confidence

confidence level used to calculate the lower and upper confidence limits of SII; numeric between 0.5 and 0.9999 or 50 and 99.99; default 0.95

multiplier

factor to multiply the SII and SII confidence limits by (e.g. set to 100 to return prevalences on a percentage scale between 0 and 100). If the multiplier is negative, the inverse of the RII is taken to account for the change in polarity; numeric; default 1;

sqrt_a

field name within dataset containing square root of a values; unquoted string; no default

b_sqrt_a

field name within dataset containing square root of a values multiplied by b values;unquoted string; no default

rii

option to return the Relative Index of Inequality (RII) with associated confidence limits as well as the SII; logical; default FALSE

reliability_stat

option to carry out the SII confidence interval simulation 10 times instead of once and return the Mean Average Difference between the first and subsequent samples (as a measure of the amount of variation); logical; default FALSE

Value

returns lower and upper SII confidence limits according to user specified confidence


PHEindicatormethods documentation built on July 1, 2020, 6:01 p.m.