View source: R/gen-scoreFACT_G7.R
scoreFACTG7 | R Documentation |
Scores the 7-item short-form of the Functional Assessment of Cancer Therapy-General (FACT-G7) from item responses.
scoreFACTG7(df, id = NULL, updateItems = FALSE, keepNvalid = FALSE)
df |
A data frame with the questionnaire items, appropriately-named. |
id |
(optional) The quoted name of a variable in |
updateItems |
(optional) Logical, if |
keepNvalid |
(optional) Logical, if |
Given a data frame that includes all of the FACT-G7 items as variables, appropriately named, this function generates the FACT-G7 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
.
A data frame containing the following scale score is returned:
FACTG7 - FACT-G7 Total Score
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
.
Keep in mind that this function (and R in general) is case-sensitive.
All variables should be in numeric or integer format.
This scoring 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.
FACT-G7 Scoring Guidelines, available at http://www.facit.org
Yanez, B., Pearman, T., Lis, C. G., Beaumont, J. L., & Cella, D. (2013). The FACT-G7: a rapid version of the functional assessment of cancer therapy-general (FACT-G) for monitoring symptoms and concerns in oncology practice and research. Annals of Oncology, 24(4), 1073-1078.
For additional details on the function arguments, see
scoreFACTG
and FACTscorer
.
## FIRST creating a df with fake item data to score itemNames <- c('GP1', 'GP4', 'GP2', 'GE6', 'GF5', 'GF3', 'GF7') exampleDat <- make_FACTdata(namesAC = itemNames, AConly = TRUE) ## NOW scoring the items in exampleDat ## Returns data frame with ONLY scale score (scoredDat <- scoreFACTG7(exampleDat)) ## Using the id argument (makes merging with original data more fool-proof): (scoredDat <- scoreFACTG7(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 <- scoreFACTG7(exampleDat, updateItems = TRUE, keepNvalid = TRUE) names(scoredDat) ## Descriptives of scored scales summary(scoredDat['FACTG7'])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.