The reliability() analysis is the only one most users will need. It tries to apply best practices by, as much as possible, complementing point estimates with confidence intervals.

reliability(
  data,
  items = NULL,
  scaleStructure = TRUE,
  descriptives = FALSE,
  itemLevel = FALSE,
  scatterMatrix = FALSE,
  scatterMatrixArgs = list(progress = FALSE),
  digits = 2,
  conf.level = 0.95,
  itemLabels = NULL,
  itemOmittedCorsWithRest = FALSE,
  itemOmittedCorsWithTotal = FALSE,
  alphaOmittedCIs = FALSE,
  omegaFromMBESS = FALSE,
  omegaFromPsych = TRUE,
  ordinal = FALSE,
  headingLevel = 3,
  ...
)

rosettaReliability_partial(
  x,
  digits = x$digits,
  headingLevel = x$headingLevel,
  printPlots = TRUE,
  echoPartial = FALSE,
  partialFile = NULL,
  quiet = TRUE,
  ...
)

# S3 method for rosettaReliability
knit_print(
  x,
  digits = x$digits,
  headingLevel = x$headingLevel,
  printPlots = TRUE,
  echoPartial = FALSE,
  partialFile = NULL,
  quiet = TRUE,
  ...
)

# S3 method for rosettaReliability
print(
  x,
  digits = x$digits,
  headingLevel = x$headingLevel,
  forceKnitrOutput = FALSE,
  printPlots = TRUE,
  ...
)

Arguments

data

The data frame

items

The items (if omitted, all columns are used)

scaleStructure

Whether to include scale-level estimates using ufs::scaleStructure()

descriptives

Whether to include mean and standard deviation eastimates and their confidence intervals

itemLevel

Whether to include item-level internal consistency estimates

scatterMatrix, scatterMatrixArgs

Whether to produce a scatter matrix, and the arguments to pass to the scatterMatrix() function.

digits

The number of digits to round the result to

conf.level

The confidence level of confidence intervals

itemLabels

Optionally, labels to use for the items (optionally, named, with the names corresponding to the items; otherwise, the order of the labels has to match the order of the items)

itemOmittedCorsWithRest, itemOmittedCorsWithTotal

Whether to include each item's correlations with, respectively, the scale with that item omitted, or the full scale.

alphaOmittedCIs

Whether to include the confidence intervals for the Coefficient Alpha estimates with the item omitted.

omegaFromMBESS, omegaFromPsych

Whether to include omega from MBESS and/or psych

ordinal

Wheher to set poly=TRUE when calling ufs::scaleStructure(), which will compute the polychoric correlation matrix to provide the scale estimates assuming ordinal-level items. Note that this may throw a variety of errors from within the psych package if the data are somehow not what psych expects

headingLevel

The number of hashes to print in front of the headings when printing while knitting

...

Any additional arguments are passed to ufs::scaleStructure() by reliability, to the default print method by print.reliability, and to rmdpartials::partial() when knitting an RMarkdown partial.

x

The object to print

printPlots

Whether to print plots (can be used to suppress plots, which can be useful sometimes)

echoPartial

Whether to show the executed code in the R Markdown partial (TRUE) or not (FALSE).

partialFile

This can be used to specify a custom partial file. The file will have object x available.

quiet

Passed on to knitr::knit() whether it should b chatty (FALSE) or quiet (TRUE).

forceKnitrOutput

Force knitr output

Value

An object with all results

Details

The rosettaReliability object that is returned has its own print() method, that, when using knitr, will use the rmdpartials package to insert an RMarkdown partial. That partial is created using rosettaReliability_partial(), which is also called by a specific knit_print() method.

Examples

### These examples aren't run during tests
### because they can take quite long
if (FALSE) {
### Simple example with only main reliability results
data(pp15, package="rosetta");
rosetta::reliability(
  pp15,
  c(
    "highDose_AttGeneral_good",
    "highDose_AttGeneral_prettig",
    "highDose_AttGeneral_slim",
    "highDose_AttGeneral_gezond",
    "highDose_AttGeneral_spannend"
  )
);

### More extensive example with an RMarkdown partial that
### displays in the viewer
rosetta::rosettaReliability_partial(
  rosetta::reliability(
    attitude,
    descriptives = TRUE,
    itemLevel = TRUE,
    scatterMatrix = TRUE
  )
);
}