scoring_ess: Scoring the Epworth Sleepiness Scale (ESS)

Description Usage Arguments Details Value References Examples

View source: R/ess.R

Description

The ESS is a 8-item scale that is designed to measure daytime sleepiness. On a 4-point scale (0-3), respondents are asked to rate their usual chances of dozing off or falling asleep while engaged in eight different activities. A total sum score ranging from 0 to 24 may be calculated.

Usage

1
scoring_ess(data, items = 1:8, keep = TRUE, nvalid = 7, digits = NULL)

Arguments

data

a data.frame containing the ESS items orderd from 1 to 8

items

A character vector with the ESS item names ordered from 1 to 8, or a numeric vector indicating the column numbers of the ESS items in data.

keep

Logical, whether to keep the single items and whether to return variables containing the number of non-missing items on each scale for each respondent. The default is TRUE.

nvalid

A numeric value indicating the number of non-missing items required for score calculations. The default is 7.

digits

Integer of length one: value to round to. No rounding by default.

Details

Value

The function returns 3 variables:

References

Johns 1991 (https://www.ncbi.nlm.nih.gov/pubmed/1798888?dopt=Abstract)

Link to questionnaire (http://epworthsleepinessscale.com/wp-content/uploads/2016/06/epworth-sleepiness-scale-sample-copy.jpg)

Examples

1
2
3
4
5
6
## Not run: 
library(dplyr)
items.ess <- paste0("ESS_", seq(1, 8, 1))
scoring_ess(mydata, items = items.ess)

## End(Not run)

nrkoehler/qscorer documentation built on April 5, 2020, 3:09 a.m.