eq5dcf: Calculate the cumulative frequency profile of an EQ-5D...

View source: R/eq5dcf.R

eq5dcfR Documentation

Calculate the cumulative frequency profile of an EQ-5D dataset

Description

Calculate the frequency, percentage, cumulative frequency and cumulative percentage for each profile in an EQ-5D dataset.

Usage

eq5dcf(data, version, ignore.invalid, proportions, digits, ...)

Arguments

data

A data.frame with columns MO, SC, UA, PD and AD representing Mobility, Self-care, Usual activities, Pain/discomfort and Anxiety/depression or a "State" column containing five digit scores. Alternatively a vector of five digit scores can also be used.

version

string of value "3L" or "5L" to indicate instrument version.

ignore.invalid

booloean whether to ignore invalid scores. TRUE returns NA, FALSE throws an error.

proportions

boolean whether to include proportion data columns Proportions and CumulativeProp. Default is FALSE.

digits

numeric specifying the number of decimal places for percentages. Defaults to 1.

...

character vector, specifying "dimensions" column names. Defaults are "MO", "SC", "UA", "PD" and "AD".

Value

a data.frame or list of data.frames of counts/percentages. Columns contain dimensions names and rows the EQ-5D score.

Examples

dat <- read.csv(system.file("extdata", "eq5d3l_example.csv", package="eq5d"))
eq5dcf(dat, "3L")


fragla/eq5d documentation built on Nov. 27, 2024, 3:23 a.m.