superb-package {superb} | R Documentation |
superb: Summary Plots with Adjusted Error Bars
Description
Computes standard error and confidence interval of various descriptive statistics under various designs and sampling schemes. The main function, superbPlot(), return a plot. superbData() returns a dataframe with the statistic and its precision interval so that other plotting package can be used. See Cousineau and colleagues (2021) doi:10.1177/25152459211035109 or Cousineau (2017) doi:10.5709/acp-0214-z for a review as well as Cousineau (2005) doi:10.20982/tqmp.01.1.p042, Morey (2008) doi:10.20982/tqmp.04.2.p061, Baguley (2012) doi:10.3758/s13428-011-0123-7, Cousineau & Laurencelle (2016) doi:10.1037/met0000055, Cousineau & O'Brien (2014) doi:10.3758/s13428-013-0441-z, Calderini & Harding doi:10.20982/tqmp.15.1.p001 for specific references.
Details
'suberb' is a library to perform descriptive statistics plots based on the superb framework. In a nutshell, the framework assert that confidence intervals must be devised according to all the relevant information that can be used to assess precision. For example, confidence intervals should be informed of the presence of within-subject design, of the fact that the sample is random or clustered, of whether the population is finite or infinite, etc.
Would you do a t-test on independent groups when you know that the data are paired? Of course, not! Why use the classic "stand-alone" confidence interval then? These classic confidence intervals are oblivious to most relevant information.
The superb framework is based on the idea that correct, well-informed, confidence intervals can be obtained with a succession of simple corrections. I call these "adjusted confidence intervals".
The main function is
superbPlot(df, ...)
where df
is a dataframe.
For more details on the underlying math, see (Cousineau 2005, 2019; Cousineau and Laurencelle 2016; Morey 2008; Baguley 2012; Loftus and Masson 1994; Goulet and Cousineau 2019)
A second function inserted in this package is (Calderini and Harding 2019)
GRD( ...)
which generates random datasets. It easily generate ficticious dataset so that superbPlot can be tested rapidly. This function is described in (Calderini and Harding 2019).
Author(s)
Maintainer: Denis Cousineau denis.cousineau@uottawa.ca
Other contributors:
Bradley Harding bradley.harding@umoncton.ca [contributor]
Marc-Andre Goulet magoulet101@gmail.com [contributor]
Jesika Walker jwalk050@uottawa.ca [artist, presenter]
References
Baguley T (2012).
“Calculating and graphing within-subject confidence intervals for ANOVA.”
Behavior Research Methods, 44, 158 – 175.
doi:10.3758/s13428-011-0123-7.
Calderini M, Harding B (2019).
“GRD for R: An intuitive tool for generating random data in R.”
The Quantitative Methods for Psychology, 15(1), 1–11.
doi:10.20982/tqmp.15.1.p001.
Cousineau D (2005).
“Confidence intervals in within-subject designs: A simpler solution to Loftus and Masson's method.”
Tutorials in Quantitative Methods for Psychology, 1, 42 – 45.
doi:10.20982/tqmp.01.1.p042.
Cousineau D (2017).
“Varieties of confidence intervals.”
Advances in Cognitive Psychology, 13, 140 – 155.
doi:10.5709/acp-0214-z.
Cousineau D (2019).
“Correlation-adjusted standard errors and confidence intervals for within-subject designs: A simple multiplicative approach.”
The Quantitative Methods for Psychology, 15, 226 – 241.
doi:10.20982/tqmp.15.3.p226.
Cousineau D, Laurencelle L (2016).
“A Correction Factor for the Impact of Cluster Randomized Sampling and Its Applications.”
Psychological Methods, 21, 121 – 135.
doi:10.1037/met0000055.
Goulet M, Cousineau D (2019).
“The power of replicated measures to increase statistical power.”
Advances in Methods and Practices in Psychological Sciences, Online, 1 – 15.
doi:10.1177/2515245919849434.
Loftus GR, Masson MEJ (1994).
“Using confidence intervals in within-subject designs.”
Psychonomic Bulletin & Review, 1, 476 – 490.
doi:10.3758/BF03210951.
Morey RD (2008).
“Confidence Intervals from Normalized Data: A correction to Cousineau (2005).”
Tutorials in Quantitative Methods for Psychology, 4, 61 – 64.
doi:10.20982/tqmp.04.2.p061.
The package includes additional, helper, functions:
ShroutFleissICC1
to compute intra-class correlation;epsilon
to compute the sphericity measure;lambda
to compute the cluster-sampling adjustment;MauchlySphericityTest
to perform a test of sphericity;WinerCompoundSymmetry
to perform a test of compound symmetry;
and example datasets described in the paper:
dataFigure1
illustrate the paradox of using stand-alone CI in between-group design;dataFigure2
illustrate the paradox of using stand-alone CI in within-subject design;dataFigure3
illustrate the paradox of using stand-alone CI in cluster-randomized sampling study;dataFigure4
illustrate the paradox of using stand-alone CI with population of finite size.
See Also
Useful links: