wsci {papaja}R Documentation

Within-Subjects Confidence Intervals

Description

Calculate Cousineau-Morey within-subjects confidence intervals.

Usage

wsci(data, id, factors, dv, level = 0.95, method = "Morey")

within_subjects_conf_int(data, id, factors, dv, level = 0.95, method = "Morey")

Arguments

data

A data.frame that contains the data.

id

Character. Variable name that identifies subjects.

factors

Character. A vector of variable names that is used to stratify the data.

dv

Character. The name of the dependent variable.

level

Numeric. Defines the width of the interval. Defaults to 0.95 for 95% confidence intervals.

method

Character. The method that is used to calculate CIs. Currently, "Morey" and "Cousineau" are supported. Defaults to "Morey".

Value

A data.frame with additional class papaja_wsci. The summary() method for this class returns a data.frame with means along lower and upper limit for each cell of the design.

References

Morey, R. D. (2008). Confidence Intervals from Normalized Data: A correction to Cousineau (2005). Tutorials in Quantitative Methods for Psychology, 4(2), 61–64.

Cousineau, D. (2005). Confidence intervals in within-subjects designs: A simpler solution to Loftus and Masson's method. Tutorials in Quantitative Methods for Psychology, 1(1), 42–45.

Examples

wsci(
   data = npk
   , id = "block"
   , dv = "yield"
   , factors = c("N", "P")
)

[Package papaja version 0.1.2 Index]