nestedAlpha: Compute Alpha for Nested Data Structures

Description Usage Arguments Details Value Author(s) References Examples

Description

This function returns a nested alpha for multilevel data as proposed by Nezlek (2016).

Usage

1
nestedAlpha(item.level.1, level.2, level.3, data, ...)

Arguments

item.level.1

The variable that includes the items on level 1.

level.2

The variable that includes the nests on level 2, for example days or measurement occasions in which the items are nested.

level.3

The cluster in which the days are clustered, usually persons, groups, classes.

data

The data frame that contains all of the above variables.

...

Other parameters that can be passed on to lmer.

Details

Nezlek, 2016, describes one way in that the internal consistency as a measure for reliabilty can be obtained for longitudinal data. The data structure for these types of examinations usually is items (for example all items of one scale) nested in days (for example 10 days of a diary study), which are again nested in persons (all subjects).

To estimate the reliability, one needs to consider the nested structure.

Please consider the following points before running the analysis:

The function relies on the lmer function in order to run the multilevel model. The multilevel model is run with standard settings, however, these can be changed using the ...-argument.

Value

An alpha for nested data.

Author(s)

K. T. Horstmann horstmak@hu-berlin.de

References

Nezlek, J. B. (in press). A practical guide to understanding reliability in studies of within-person variability. Journal of Research in Personality. http://dx.doi.org/10.1016/j.jrp.2016.06.020.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
sample data frame, 10 persons, 10 days with 4 items per day
person <- sort(rep(letters[1:10], 40))
day <- rep(sort(rep(seq(1:10), 4)), 10)
variable <- rnorm(400, 50, 10)
data <- data.frame(person, day, variable, stringsAsFactors = FALSE)

nestedAlpha(item.level.1 = "variable",
            level.2      = "day",
            level.3      = "person",
            data         = data)

kthorstmann/horst documentation built on May 20, 2019, 7:04 p.m.