make_FACTdata: Make fake FACT-like data to illustrate scoring functions

Description Usage Arguments Details Value Examples

Description

Generates FACT-like questionnaire answers for fake respondents.

Usage

1
2
make_FACTdata(namesAC = NULL, N = 8, AConly = FALSE, pmiss1 = 0.1,
  pmiss2 = 0.5)

Arguments

namesAC

Character vector of the "Additional Concerns" item names.

N

An integer specifying how many fake respondents to generate. Default is 8.

AConly

Logical, if FALSE (the default) the 27 FACT-G items will be generated in addition to items you supply to namesAC. If TRUE, then only the items you supply to namesAC are generated.

pmiss1

The proportion of items with missing answers in the first half of respondents.

pmiss2

The proportion of items with missing answers in the second half of respondents.

Details

This function is used to generate fake responses to FACT/FACIT questionnaires. It is a utility to generate example data for testing the functions and for demonstrating their usage. Missing item proportions can be specified separately for the first and second half of respondents in the generated data frame (using pmiss1 and pmiss2, respectively). If AConly = FALSE, the default, then FACT-G items will automatically be generated in addition to any "Additional Concerns" (AC) items given to namesAC. Set AConly = TRUE to generate only the AC items. If namesAC = NULL (the default), then only FACT-G items will be generated.

If AConly = TRUE then at least 2 item names must be given to namesAC.

Value

A data frame with N fake respondents (8 by default). The first half of respondents will have missing values (coded as 9) for roughly 10% of the items, and the last half will have missing values for roughly 50% of the items.

Examples

1
2
3
4
(exampleDat <- make_FACTdata())
itemNames <- c('B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8', 'B9', 'P2')
(exampleDat <- make_FACTdata(namesAC = itemNames))
(exampleDat <- make_FACTdata(namesAC = itemNames, AConly = TRUE))

raybaser/FACTscorer documentation built on May 27, 2019, 2:05 a.m.