View source: R/reliability.h.R
reliability | R Documentation |
Reliability Analysis
reliability(data, vars, alphaScale = TRUE, omegaScale = FALSE,
meanScale = FALSE, sdScale = FALSE, corPlot = FALSE,
alphaItems = FALSE, omegaItems = FALSE, meanItems = FALSE,
sdItems = FALSE, itemRestCor = FALSE, revItems = NULL)
data |
the data as a data frame |
vars |
a vector of strings naming the variables of interest in
|
alphaScale |
|
omegaScale |
|
meanScale |
|
sdScale |
|
corPlot |
|
alphaItems |
|
omegaItems |
|
meanItems |
|
sdItems |
|
itemRestCor |
|
revItems |
a vector containing strings naming the varibales that are reverse scaled |
A results object containing:
results$scale | a table | ||||
results$items | a table | ||||
results$corPlot | an image | ||||
results$meanScoreOV | an output | ||||
results$sumScoreOV | an output | ||||
Tables can be converted to data frames with asDF
or as.data.frame
. For example:
results$scale$asDF
as.data.frame(results$scale)
data('iris')
reliability(iris, vars = c('Sepal.Length', 'Sepal.Width', 'Petal.Length', 'Petal.Width'),
omegaScale = TRUE)
#
# RELIABILITY ANALYSIS
#
# Scale Reliability Statistics
# -----------------------------------------
# Cronbach's alpha McDonald's omega
# -----------------------------------------
# scale 0.708 0.848
# -----------------------------------------
#
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.