Skip to content

Conversation

@mattansb
Copy link
Member

library(effectsize)

data("desirability")

head(desirability)
#>   participant_id poop chocolate
#> 1          088cf    4         6
#> 2          bcae1    1         7
#> 3          d21b0    1         7
#> 4          2019a    1         7
#> 5          c1b73    1         7
#> 6          e8e9d    1         7

repeated_measures_d(Pair(chocolate, poop) ~ 1, data = desirability)
#> d (rm) |       95% CI
#> ---------------------
#> 6.16   | [5.59, 6.73]
#> 
#> - Adjusted for small sample bias.

# More options:
repeated_measures_d(Pair(chocolate, poop) ~ 1, data = desirability, mu = 3.4)
#> d (rm) |       95% CI
#> ---------------------
#> 2.14   | [1.90, 2.37]
#> 
#> - Adjusted for small sample bias.
#> - Deviation from a difference of 3.4.
repeated_measures_d(Pair(chocolate, poop) ~ 1, data = desirability, alternative = "greater")
#> d (rm) |      95% CI
#> --------------------
#> 6.16   | [5.68, Inf]
#> 
#> - Adjusted for small sample bias.
#> - One-sided CIs: upper bound fixed at [Inf].

# Other methods
repeated_measures_d(Pair(chocolate, poop) ~ 1, data = desirability, method = "av")
#> d (av) |       95% CI
#> ---------------------
#> 6.15   | [6.02, 6.28]
#> 
#> - Adjusted for small sample bias.
repeated_measures_d(Pair(chocolate, poop) ~ 1, data = desirability, method = "b")
#> Becker's d |       95% CI
#> -------------------------
#> 8.20       | [7.67, 8.73]
#> 
#> - Adjusted for small sample bias.
repeated_measures_d(Pair(chocolate, poop) ~ 1, data = desirability, method = "d")
#> Cohen's d |       95% CI
#> ------------------------
#> 6.15      | [5.85, 6.46]
#> 
#> - Adjusted for small sample bias.
repeated_measures_d(Pair(chocolate, poop) ~ 1, data = desirability, method = "z")
#> d (z) |       95% CI
#> --------------------
#> 4.27  | [3.99, 4.55]
#> 
#> - Adjusted for small sample bias.

# d_z is the same as Cohen's d for one sample (of individual difference):
cohens_d(chocolate - poop ~ 1, data = desirability)
#> Cohen's d |       95% CI
#> ------------------------
#> 4.27      | [3.99, 4.55]

Created on 2025-10-17 with reprex v2.1.1

@DominiqueMakowski
Copy link
Member

Lol funniest shit I've seen in a while

@ianhussey
Copy link

ianhussey commented Oct 19, 2025

Hi - person who collected the poop/chocolate data here.

Could I suggest that you instead use the following data subset and variables in the examples?

https://github.com/ianhussey/not-so-simple-preferences/blob/main/data/processed/data_processed_subset_with_exclusions.csv

The dataset you're currently using doesn't a) apply the various attention checks and other exclusions and b) uses the desirability items. While that's the one i posted about on bsky, for various reasons I suspect that its not a good benchmark, and not the one we'll be communicating later as a good example of a maximum positive control effect size. Instead I suggest you use the three-item evaluations scale, which instead estimates "how positive or negative is a bowl of chocolates relative to a toilet filled with human poop". These columns were called 'classic' in the original data, but I've renamed them to "evaluations" here for you, selected only the relevant columns, and applied the exclusions.

Suggested citation:
Hussey, I., & Cummins, J. (2025). (Not so) simple preferences. https://github.com/ianhussey/not-so-simple-preferences

@mattansb
Copy link
Member Author

Thanks @ianhussey!

I've updated the data and docs. The docs are here:

https://github.com/easystats/effectsize/pull/685/files#diff-9e9409e340d36be06d00cbeefbb4a7d7a2a3e980a75fd541c8a863f4e6c5f77fR87

Here is the updated example from ?repeated_measures_d()

library(effectsize)

data("preferences")
# Is chocolate preferred over... poop?

repeated_measures_d(Pair(chocolate, poop) ~ 1, data = preferences)
#> d (rm) |       95% CI
#> ---------------------
#> 5.58   | [5.01, 6.15]
#> 
#> - Adjusted for small sample bias.

# More options:
repeated_measures_d(Pair(chocolate, poop) ~ 1, data = preferences,
                    mu = 3.4)
#> d (rm) |       95% CI
#> ---------------------
#> 1.53   | [1.32, 1.73]
#> 
#> - Adjusted for small sample bias.
#> - Deviation from a difference of 3.4.
repeated_measures_d(Pair(chocolate, poop) ~ 1, data = preferences,
                    alternative = "greater")
#> d (rm) |      95% CI
#> --------------------
#> 5.58   | [5.11, Inf]
#> 
#> - Adjusted for small sample bias.
#> - One-sided CIs: upper bound fixed at [Inf].

# Other methods
repeated_measures_d(Pair(chocolate, poop) ~ 1, data = preferences,
                    method = "av")
#> d (av) |       95% CI
#> ---------------------
#> 5.57   | [5.43, 5.71]
#> 
#> - Adjusted for small sample bias.
repeated_measures_d(Pair(chocolate, poop) ~ 1, data = preferences,
                    method = "b")
#> Becker's d |       95% CI
#> -------------------------
#> 5.17       | [4.82, 5.53]
#> 
#> - Adjusted for small sample bias.
repeated_measures_d(Pair(chocolate, poop) ~ 1, data = preferences,
                    method = "d")
#> Cohen's d |       95% CI
#> ------------------------
#> 5.58      | [5.29, 5.86]
#> 
#> - Adjusted for small sample bias.
repeated_measures_d(Pair(chocolate, poop) ~ 1, data = preferences,
                    method = "z")
#> d (z) |       95% CI
#> --------------------
#> 3.56  | [3.32, 3.80]
#> 
#> - Adjusted for small sample bias.

Created on 2025-10-20 with reprex v2.1.1

@bwiernik
Copy link
Contributor

Came here really hoping the WORDLIST update was to add "poop", but was alas disappointed

@mattansb
Copy link
Member Author

mattansb commented Nov 9, 2025

@ianhussey okay to merge?

@ianhussey
Copy link

yes fine by me!

@mattansb mattansb merged commit 64afba0 into main Nov 11, 2025
20 of 25 checks passed
@mattansb mattansb deleted the desirability branch November 11, 2025 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants