This function wraps functions from the careless package to help inspect and diagnose careless participants. It is optimized for using in R Markdown files.

carelessReport(
  data,
  items = names(data),
  nFlags = 1,
  flagUnivar = 0.99,
  flagMultivar = 0.95,
  irvSplit = 4,
  headingLevel = 3,
  datasetName = NULL,
  responseTime = NULL,
  headingSuffix = " {.tabset}",
  digits = 2,
  missingSymbol = "Missing"
)

Arguments

data

The dataframe.

items

The items to look at.

nFlags

How many indicators need to be flagged for a participant to be considered suspect.

flagUnivar

How extreme a score has to be for it to be flagged as suspicous univariately.

flagMultivar

This has not been implemented yet.

irvSplit

Whether to split for the IRV, and if so, in how many parts.

headingLevel

The level of the heading in Markdown (the number of #s to include before the heading).

datasetName

The name of the dataset to display (to override, if desired).

responseTime

If not NULL, the name of a column containing the participants' response times.

headingSuffix

The suffix to include; by default, set such that the individual participants IRP plots are placed in separate tabs.

digits

The number of digits to round to.

missingSymbol

How to represent missing values.

Value

NULL, invisibly; and prints the report.

Examples

### Get the BFI data taken from the `psych` package
dat <- ufs::bfi;

### Get the variable names for the regular items
bfiVars <-
  setdiff(names(dat),
          c("gender", "education", "age"));

### Inspect suspect participants, very conservatively to
### limit the output (these are 2800 participants).
carelessReport(data = dat,
               items = bfiVars,
               nFlags = 5);
#> 
#> Package "careless" needed for this function to work. You can install it using:
#> 
#>   install.packages('careless');