scoreFACT_EGFRI: Score the FACT-EGFRI

View source: R/tx-scoreFACT_EGFRI.R

scoreFACT_EGFRIR Documentation

Score the FACT-EGFRI

Description

Scores the Functional Assessment of Cancer Therapy - for patients treated with EGFR Inhibitors (FACT-EGFRI) from item responses.

Usage

scoreFACT_EGFRI(df, id = NULL, updateItems = FALSE, keepNvalid = FALSE)

Arguments

df

A data frame with the questionnaire items, appropriately-named.

id

(optional) The quoted name of a variable in df with a unique value for each row of df. If an id variable is provided here, it will also be included with the scale scores in the output data frame. This can facilitate accurate merging of the scale scores back into the input df.

updateItems

(optional) Logical, if TRUE then updated versions of the items (i.e., re-coded for score calculation) will be returned in the output data frame with the scale scores. The default, FALSE, does not save any updated versions of the items in the resulting data frame. Most users will want to omit this argument or, equivalently, set it to FALSE.

keepNvalid

(optional) Logical, if TRUE then the output data frame will have additional variables containing the number of valid, non-missing responses from each respondent to the items on a given scale (see Details). If FALSE (the default), these variables will not be in the returned data frame. Most users will want to omit this argument or, equivalently, set it to FALSE.

Details

Given a data frame that includes all of the FACIT-EGFRI items as variables, appropriately named, this function generates the FACIT-EGFRI scale score. It is crucial that the item variables in the supplied data frame are named according to FACT conventions. For example, the first item should be named GP1, the second GP2, and so on. Please refer to the materials provided by http://www.facit.org for the particular questionnaire you are using. In particular, refer to the left margin of the official questionnaire (i.e., from facit.org) for the appropriate item variable names.

For more details on the updateItems and keepNvalid arguments, see the documentation entry for scoreFACTG and FACTscorer.

Value

A data frame containing the following scale score is returned:

  • FACIT_EGFRI - FACT EGFR Inhibitors

If a variable was given to the id argument, then that variable will also be in the returned data frame. Additional, relatively unimportant, variables will be returned if updateItems = TRUE or keepNvalid = TRUE.

Note

Keep in mind that this function (and R in general) is case-sensitive.

All items in df should be numeric (i.e., of type integer or double).

This function expects missing item responses to be coded as NA, 8, or 9, and valid item responses to be coded as 0, 1, 2, 3, or 4. Any other value for any of the items will result in an error message and no scores.

References

FACT-EGFRI Scoring Guidelines, available at http://www.facit.org

See Also

For additional details on the function arguments, see scoreFACTG and FACTscorer. For brevity, examples are omitted below. However, this function is very similar to the scoreFACTG7 function. See the documentation for scoreFACTG7 for examples. Alternatively, examples for scoreFACT_EGFRI can be accessed by running example(scoreFACT_EGFRI).

Examples

## FIRST creating a df with fake item data to score
itemNames <- c('ST4', 'ST5', 'ST6', 'ST7', 'ST9', 'ST32', 'ST22', 'ST17', 'ST24',
  'ST37', 'ST26', 'ST34', 'ST38', 'ST16', 'ST15', 'ST29', 'B5', 'ST11')
exampleDat <- make_FACTdata(namesAC = itemNames, AConly = TRUE)

## NOW scoring the items in exampleDat

## Returns data frame with ONLY scale score
(scoredDat <- scoreFACT_EGFRI(exampleDat))

## Using the id argument (makes merging with original data more fool-proof):
(scoredDat <- scoreFACT_EGFRI(exampleDat, id = "ID"))

## Merge back with original data, exampleDat:
mergeDat <- merge(exampleDat, scoredDat, by = "ID")
names(mergeDat)

## Returns scale score, plus recoded items (updateItems = TRUE)
## Also illustrates effect of setting keepNvalid = TRUE.
scoredDat <- scoreFACT_EGFRI(exampleDat, updateItems = TRUE, keepNvalid = TRUE)
names(scoredDat)
## Descriptives of scored scales
summary(scoredDat['FACIT_EGFRI'])

raybaser/FACTscorer documentation built on March 29, 2022, 7:50 p.m.