getBootCIalpha: function returning observed Cronbach alpha with bootstrap...

Description Usage Arguments Value History/development log Author(s) See Also Examples

View source: R/getBootCIalpha.R

Description

function returning observed Cronbach alpha with bootstrap confidence interval around that value

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
getBootCIalpha(
  dat,
  verbose = TRUE,
  na.rm = TRUE,
  nLT20err = TRUE,
  nGT10kerr = TRUE,
  bootReps = 1000,
  conf = 0.95,
  bootCImethod = c("perc", "norm", "basic", "bca")
)

Arguments

dat

data, matrix, data frame or tibble and numeric item data as columns

verbose

logical, if FALSE switches off messages

na.rm

logical which causes function to throw error if there is missing data

nLT20err

logical, throws error if length(na.omit(dat)) < 20, otherwise returns NA for CI

nGT10kerr

logical, throws error if length(na.omit(dat)) > 10k to prevent very long rusn, override with FALSE

bootReps

integer for number of bootstrap replications

conf

numeric confidence interval desired as fraction, e.g. .95

bootCImethod

method of deriving bootstrap CI from "perc", "norm", "basic" or "bca"

Value

list of length 3: obsAlpha, LCLAlpha and UCLAlpha

History/development log

Started before 5.iv.21

Author(s)

Chris Evans

See Also

Other bootstrap CI functions: getBootCICSC(), getBootCICorr(), getBootCImean()

Other Chronbach alpha functions: getChronbachAlpha()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
set.seed(12345)
tmpMat <- matrix(rnorm(200), ncol = 10)
tmpDat <- as.data.frame(tmpMat)
tmpTib <- as_tibble(tmpDat)

### all default arguments
getBootCIalpha (tmpMat)

## End(Not run)

cpsyctc/CECPfuns documentation built on April 15, 2021, 3:26 a.m.