epices_score {amscorer}R Documentation

Calculate EPICES Score

Description

This function calculates the EPICES score, which is used to investigate the relationship between social precariousness and risk factors. The EPICES score is an individual and quantitative scale based on 11 questions regarding material and social problems. Visit https://www.santepubliquefrance.fr/docs/le-score-epices-un-score-individuel-de-precarite.-construction-du-score-et-mesure-des-relations-avec-des-donnees-de-sante-dans-une-population-de for more information.

Usage

epices_score(my_data, prefix = "epices", replace_na_with_zero = FALSE)

Arguments

my_data

A data frame containing the necessary columns for the EPICES score calculation (11 columns). Yes/no responses should be coded as yes-1, no-0.

prefix

A string prefix for the column names (default is "epices").

replace_na_with_zero

A boolean indicating whether to replace NA values with zero (default is TRUE).

Details

The data frame should contain the EPICES items ordered from 1 to 11::

Value

A data frame with an additional column "epices_score" containing the calculated EPICES scores. Returns NA for cases with missing values.

References

Sass et al. (2006) doi:10.1007/s10332-006-0131-5,

Examples

my_data <- data.frame(
epices_1 = c(1, 0, 1),
epices_2 = c(0, 1, 1),
epices_3 = c(0, 0, 0),
epices_4 = c(1, 0, 0),
epices_5 = c(0, 1, 0),
epices_6 = c(1, 0, 1),
epices_7 = c(0, 1, 0),
epices_8 = c(0, 0, 1),
epices_9 = c(1, 1, 0),
epices_10 = c(0, 0, 1),
epices_11 = c(1, 0, NA)
)
epices_score(my_data, prefix = "epices", replace_na_with_zero = FALSE)

[Package amscorer version 0.1.0 Index]