View source: R/util-scoreFACT_any.R
scoreFACT_any | R Documentation |
Master function to score most FACT/FACIT instruments
scoreFACT_any( df, id = NULL, namesAC = NULL, namesRev = NULL, nameSub = "XX_SUB", nameTot = "FACT_XX", AConly = FALSE, updateItems = FALSE, keepNvalid = FALSE )
df |
A data frame with the questionnaire items, appropriately-named. |
id |
(optional) The quoted name of a variable in |
namesAC |
A character vector of quoted variable names. |
namesRev |
A character vector of quoted variable names (or a single
quoted variable name) that should be reverse scored. The variable names
must be among those given to the |
nameSub |
(optional) A single quoted name that will become the name of
the scored AC subscale. If this argument is omitted, the default value
will be used, |
nameTot |
(optional) A single quoted name that will form the root of the
"_TOTAL" and "_TOI" score names. For example, if |
AConly |
(optional) Logical, if omitted or set to |
updateItems |
(optional) Logical, if |
keepNvalid |
(optional) Logical, if |
This is the workhorse function called by most of the other functions in this package. It can score the majority of the instruments in the FACT/FACIT family of questionnaires. Specifically, it can score any instrument that fits one of these two formats:
FACT-G + AC: Measures comprised of the FACT-G (General) items plus a set of "Additional Concerns" (AC) items that produce a single subscale score. Most of the FACT/FACIT instruments conform to this format, and follow a uniform scoring procedure that produces all of the FACT-G scores (PWB, SWB, EWB, FWB, and FACT-G Total Score), the AC subscale score (AC_SUB), the AC-specific Trial Outcome Index (TOI, PWB+FWB+AC_SUB), and the AC-specific Total Score (PWB+SWB+EWB+FWB+AC_SUB).
AC Only: Measures comprised of only "Additional Concerns"
(AC) items (or any set of items) that produce a single score. This is
relevant for cases in which only the AC items were administered
from a more comprehensive instrument (e.g., one that originally included
FACT-G + AC items). This is also relevant for some of the symptom indexes
and other single-score measures. These AC-only and single-score measures
can be scored by setting AConly = TRUE
.
A data frame with the following scale scores is returned:
PWB - Physical Well-Being subscale
SWB - Social/Family Well-Being subscale
EWB - Emotional Well-Being subscale
FWB - Physical Well-Being subscale
FACTG - FACT-G Total Score (PWB+SWB+EWB+FWB)
AC_SUB - AC subscale score
FACT_AC_TOTAL - The AC-Specific Total Score (PWB+SWB+EWB+FWB+AC_SUB)
FACT_AC_TOI - The AC-Specific Trial Outcome Index (PWB+FWB+AC_SUB)
If AConly = TRUE
, the only scale score returned is AC_SUB.
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
.
## Create vectors of item names FACT_B_names <- c("B1", "B2", "B3", "B4", "B5", "B6", "B7", "B8", "B9", "P2") FACT_B_rev <- c("B1", "B2", "B3", "B5", "B6", "B7", "B8", "P2") ## Make example data exampleDat <- make_FACTdata(namesAC = FACT_B_names) ## Score FACT-G + AC items scoredDat <- scoreFACT_any(df = exampleDat, namesAC = FACT_B_names, namesRev = FACT_B_rev, nameSub = "BCS", nameTot = "FACT_B") scoredDat ## Score only AC items scoredDat <- scoreFACT_any(df = exampleDat, namesAC = FACT_B_names, namesRev = FACT_B_rev, nameSub = "BCS", AConly = TRUE) scoredDat
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.