Learn R Programming

esci: Estimation Statistics with Confidence Intervals

esci provides student-friendly tools for estimation statistics:

  • effect sizes with confidence intervals for many research designs
  • meta-analysis
  • visualizations emphasizing effect sizes and uncertainty
  • strong hypothesis testing with interval nulls

esci is both an R package and a module in jamovi. If you're looking for the R package, stay here. If you want esci in jamovi, download and install jamovi and then use the module library to add esci.

Leave comments, bug reports, suggestions, and questions about esci here

esci is still under development; expect breaking changes in the future especially for the visualization functions. If you need production-ready estimation, turn to statpsych

esci is built on top of statpsych and metafor. That is, almost all of the statistical calculations are passed off to these packages. The only exception is for confidence intervals for Cohen's d (see documentation). Why does esci exist, then?

  • To provide a design-based approach; each function in esci is for one type of research design (e.g. two groups with a continuous variable); it provides all the effect sizes relevant to that design in one convenient function (e.g. mean difference, cohen's d, median difference, ratio of means, ratio of medians).
  • To make visualization easier; esci provides visualizations that emphasize effect sizes and uncertainty
  • To integrate with GUIs for students; esci integrates into jamovi and (very soon) JASP.
  • To support student learning, from intro to advanced levels; esci is extensively used in the recently released second edition of our intro textbook (https://thenewstatistics.com/itns/) and should be ideal for use in higher level and graduate courses.

The visualizations produced by esci are exquisite in a large part because of the lovely ggdist package by Matthew Kay.

Installation

esci is availableon CRAN; you can install with:

install.packages("esci")

Or, get the stable branch directly from github

# install.packages("devtools")
devtools::install_github('rcalinjageman/esci')

Or, try out the development branch:

# install.packages("devtools")
devtools::install_github('rcalinjageman/esci',  branch = "development")

Roadmap

  • Finish writing documentation and tests
  • Review all functions for consistency of parameter names and returned object names
  • Rewrite visualization functions completely to remove clunky approaches to the difference axis and other issues
  • Complete JASP integration
  • Rewrite jamovi integration
  • Add prediction intervals for basic designs
  • Repeated measures with 1 IV and multiple groups
  • Fully within-subjects 2x2 design
  • Arbitrarily complex designs

Example

library(esci)

data("data_kardas_expt_4")
estimate <- estimate_mdiff_two(data_kardas_expt_4, Prediction, Exposure)
plot_mdiff(estimate)

Copy Link

Version

Install

install.packages('esci')

Monthly Downloads

405

Version

1.0.7

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Robert J. Calin-Jageman

Last Published

February 22nd, 2025

Functions in esci (1.0.7)

data_effronraj_fakenews

EffronRaj fakenews - Ch8 - from Effron and Raj (2020), v1.1
data_chap_8_paired_ex_8.18

Fictitious data from an unrealistically small HEAT study comparing scores for a single group of students before and after a workshop on climate change.
data_campus_involvement

Campus Involvement - Ch11 - for End-of-Chapter Exercise 11.7
data_college_survey_2

College survey 2 - Ch05 - for End-of-Chapter Exercise 5.4
data_exam_scores

Exam Scores - Ch11 - for End-of-Chapter Exercise 11.2
data_emotion_heartrate

Emotion heartrate - Ch8 - from Lakens (2013)
data_damischrcj

DamischRCJ - Ch9 - from 6 Damisch studies, and Calin-Jageman and Caldwell (2014)
data_halagappa

Halagappa - Ch14 - from Halagappa et al. (2007)
data_gender_math_iat

Gender math IAT - Ch07 - Ithaca and SDSU replications of Nosek et al. (2002)
data_gender_math_iat_ma

Gender math IAT ma - Ch9 - Many Labs replications of Nosek et al. (2002)
data_home_prices

Home Prices - Ch12 - for End-of-Chapter Exercise 12.2
data_latimier_prequiz

Latimier Prequiz - Ch03 - Prequiz group in Latimier et al. (2019)
data_college_survey_1

College survey 1 - Ch03 - for End-of-Chapter Exercise 3.3
data_latimier_quiz

Latimier Quiz - Ch03 - Quiz group in Latimier et al. (2019)
data_labels_flavor

Labels flavor - Ch8 - from Floretta-Schiller et al. (2015)
data_latimier_quiz_prequiz

Latimier Quiz Prequiz - Ch07 - Quiz and Prequiz groups in Latimier et al. (2019)
data_latimier_reread

Latimier Reread - Ch03 - Reread group in Latimier et al. (2019)
data_sleep_beauty

Sleep Beauty - Ch11 - for End-of-Chapter Exercise 11.6
data_religious_belief

Religious belief - Ch03 - for End-of-Chapter Exercise 3.5
data_meditationbrain

MeditationBrain - Ch15 - from Holzel et al. (2011)
data_mccabemichael_brain2

McCabeMichael brain2 - Ch9 - from Michael et al. (2013)
data_kardas_expt_3

Kardas Expt 3 - Ch07 - from Kardas and O'Brien (2018), Experiment 3
data_kardas_expt_4

Kardas Expt 4 - Ch07 - from Kardas and O'Brien (2018), Experiment 4
data_macnamara_r_ma

Macnamara r ma - Ch11 - from Macnamara et al. (2014)
data_religionsharing

ReligionSharing - Ch14 - RETRACTED DATA used in End-of-Chapter Exercise 14.3
data_latimier_reread_prequiz

Latimier Reread Prequiz - Ch07 - Reread and Prequiz groups in Latimier et al. (2019)
data_mccabemichael_brain

McCabeMichael brain - Ch9 - from Michael et al. (2013)
data_penlaptop1

% transcription scores from pen and laptop group of Meuller et al., 2014
data_studystrategies

StudyStrategies - Ch14 - from O'Reilly et al. (1998)
data_organicmoral

OrganicMoral - Ch14 - from Eskine (2013)
data_stickgold

Stickgold - Ch06 - from Stickgold et al. (2000)
data_latimier_reread_quiz

Latimier Reread Quiz - Ch07 - Reread and Quiz groups in Latimier et al. (2019)
data_smithrecall

SmithRecall - Ch15 - from Smith et al. (2016)
estimate_mdiff_2x2_between

Estimates for a 2x2 between-subjects design with a continuous outcome variable
data_rattanmotivation

RattanMotivation - Ch14 - from Rattan et al. (2012)
data_latimier_3groups

Latimier 3Groups - Ch14 - 3 groups in Latimier et al. (2019)
data_powerperformance_ma

PowerPerformance ma - Ch9 - from Burgmer and Englich (2012), and Cusack et al. (2015)
estimate_mdiff_ind_contrast

Estimates for a multi-group design with a continuous outcome variable
estimate_mdiff_one

Estimates for a single-group design with a continuous outcome variable compared to a reference or population value
data_selfexplain

SelfExplain - Ch15 - from McEldoon et al. (2013)
data_simmonscredibility

SimmonsCredibility - Ch14 - from Simmons and Nelson (2020)
estimate_mdiff_paired

Estimates for a repeated-measures study with two measures of a continuous variable
estimate_mdiff_2x2_mixed

Estimates for a 2x2 mixed factorial design with a continuous outcome variable
esci_plot_difference_axis_x

Add a difference axis to the x axis of an esci forest plot
estimate_proportion

Estimates for a categorical variable with no grouping (single-group design)
estimate_mdiff_two

Estimates for a two-group study with a continuous outcome variable
estimate_r

Estimates the linear correlation (Pearson's r) between two continuous variables
estimate_magnitude

Estimates for a continuous variable with no grouping (single-group design)
estimate_pdiff_ind_contrast

Estimates for a multi-group study with a categorical outcome variable
estimate_pdiff_one

Estimates for a single-group design with a categorical outcome variable compared to a reference or population value.
jamovimdifftwo

Means and Medians: Two Groups
jamovicorrelation

Correlations: Single Group
estimate_rdiff_two

Estimates the difference in correlation for a design with two groups and two continuous outcome variables
jamovimetamdiff

Meta-Analysis: Difference in Means
jamoviproportion

Proportions: Single Group
jamovirdifftwo

Correlations: Two Groups
estimate_pdiff_paired

Estimates for a repeated-measures study with two measures of a categorical variable
estimate_pdiff_two

Estimates for a two-group study with a categorical outcome variable
data_videogameaggression

VideogameAggression - Ch15 - from Hilgard (2015)
geom_meta_diamond_h

Meta-analysis diamond
jamovimetaproportion

Meta-Analysis: Proportions
jamovimetar

Meta-Analysis: Correlations
data_thomason_1

Thomason 1 - Ch11 - from Thomason 1
jamovimagnitude

Means and Medians: Single Group
jamovimetapdiff

Meta-Analysis: Difference in Proportions
jamovimetamean

Meta-Analysis: Means
jamovimdiff2x2

Means and Medians: 2x2 Factorial
plot_mdiff

Plots for comparing continuous outcome variables between conditions
plot_meta

Generates a forest plot displaying results of a meta-analysis
jamovidescribe

Describe
meta_mean

Estimate a meta-analytic mean across multiple single-group studies.
plot_interaction

Plot the interaction from a 2x2 design
meta_pdiff_two

Estimate meta-analytic difference in proportions over multiple studies with two independent groups and a categorical outcome variable.
plot_correlation

Plot an estimated Pearson's r value
plot_describe

Plot a histogram or dotplot of an estimated magnitude with raw data
jamovimdiffpaired

Means and Medians: Paired
jamovimdiffindcontrast

Means and Medians: Independent Groups Contrast
plot_magnitude

Plot the mean or median for a continuous variable
meta_mdiff_two

Estimate meta-analytic difference in means across multiple two-group studies.
meta_d2

Estimate meta-analytic standardized mean difference across multiple two group studies (all paired, all independent, or a mix).
test_rdiff

Test a hypothesis about a difference in correlation strength
jamovipdifftwo

Proportions: Two Groups
jamovipdiffpaired

Proportions: Paired
meta_any

Estimate any meta effect.
meta_d1

Estimate a meta-analytic Cohen's d1 across multiple studies
plot_proportion

Plot an estimated proportion
plot_pdiff

Plots for comparing categorical outcome variables between conditions
overview_nominal

Calculates descriptive statistics for a numerical variable
test_mdiff

Test a hypothesis about a difference in a continuous outcome variable.
plot_rdiff

Plots for comparing Pearson r values between conditions
overview

Calculates descriptive statistics for a continuous variable
test_pdiff

Test a hypothesis about a difference in proportion
meta_r

Estimate meta-analytic Pearson's r across multiple studies with two continuous outcome variables.
meta_proportion

Estimate a meta-analytic proportion of outcomes over multiple studies with a categorical outcome variable.
plot_scatter

Generates a scatter plot of data for two continuous variables
test_correlation

Test a hypothesis about the strength of a Pearson's r correlation
print.esci_estimate

Print an esci_estimate
CI_smd_one

Estimate standardized mean difference (Cohen's d1) for a single group
data_altruism_happiness

Altruism Happiness - Ch12 - from Brethel-Haurwitz and Marsh (2014)
data_clean_moral

Clean moral - Ch07 - from Schnall et al. (2008), Study 1, and Johnson et al. (2014)
data_anchor_estimate_ma

Anchor Estimate ma - Ch9 - Many Labs replications of Jacowitz and Kahneman (1995)
data_basol_badnews

Basol badnews - Ch07 - from Basol et al. (2020)
data_bem_psychic

Bem Psychic - Ch13 - from Bem and Honorton (1994)
data_bodywellf

BodyWellF - Ch12 - Body Satisfaction and Well-being data for females from Figure 11.24 right panel
data_flag_priming_ma

Flag Priming ma - Ch9 - Many Labs replications of Carter et al. (2011)
CI_diamond_ratio

Estimate the diamond ratio for a meta-analytic effect, a measure of heterogeneity
CI_smd_ind_contrast

Estimate standardized mean difference (Cohen's d) for an independent groups contrast
data_bodywellm

BodyWellM - Ch12 - Body Satisfaction and Well-being data for males from Figure 11.24 left panel
data_bodywellfm

BodyWellFM - Ch12 - Body Satisfaction and Well-being data from Figure 11.1