R/reliability.R
rosettaReliability.Rd
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,
...
)
The data frame
The items (if omitted, all columns are used)
Whether to include scale-level estimates using
ufs::scaleStructure()
Whether to include mean and standard deviation eastimates and their confidence intervals
Whether to include item-level internal consistency estimates
Whether to produce a scatter matrix,
and the arguments to pass to the scatterMatrix()
function.
The number of digits to round the result to
The confidence level of confidence intervals
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)
Whether to include each item's correlations with, respectively, the scale with that item omitted, or the full scale.
Whether to include the confidence intervals for the Coefficient Alpha estimates with the item omitted.
Whether to include omega from MBESS
and/or psych
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
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.
The object to print
Whether to print plots (can be used to suppress plots, which can be useful sometimes)
Whether to show the executed code in the R Markdown
partial (TRUE
) or not (FALSE
).
This can be used to specify a custom partial file. The
file will have object x
available.
Passed on to knitr::knit()
whether it should b
chatty (FALSE
) or quiet (TRUE
).
Force knitr output
An object with all results
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.
### 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
)
);
}