Comments (1)
Could it be easier in future to customise the subtitle formatting style?
Probably. Although such fine control would require adding a lot of arguments, which I am not too keen on doing that.
For now, you can just adjust the expressions to your liking via statsExpressions
library(statsExpressions)
sub <- two_sample_test(mtcars, am, wt, type = "np")
sub$expression
#> [[1]]
#> paste("log"["e"](italic("W")["Mann-Whitney"]), " = ", "5.44",
#> ", ", italic("p"), " = ", "4.35e-05", ", ", widehat(italic("r"))["biserial"]^"rank",
#> " = ", "0.87", ", CI"["95%"], " [", "0.66", ", ", "1.00",
#> "]", ", ", italic("n")["obs"], " = ", "32")
library(ggstatsplot)
library(ggplot2)
# modify the expression to your liking
ggbetweenstats(mtcars, am, wt) +
labs(subtitle = ggplot2::expr(paste(
italic("W")["Mann-Whitney"], " = ", "230.44",
", ", italic("p"), " = ", "4.35", " X ", "10"^"-05", ", ", widehat(italic("r"))["biserial"]^"rank",
" = ", "0.87", ", CI"["95%"], " [", "0.68", ", ", "1.00",
"]", ", ", italic("n")["obs"], " = ", "32"
)))
Created on 2021-03-23 by the reprex package (v1.0.0)
Also, isn't it commonly known as the U test? I wonder why W is used for the test statistic.
This is because W is what stats::wilcox.test
returns. And, it's not just ggstatsplot
, you look at output from other software programs (e.g., JASP), you will see that they also report the same:
from statsexpressions.
Related Issues (20)
- Add CI method attribute from easystats to output data frames
- Remove `n` parameter from `add_expression_col()`?
- Use `{patrick}` for parametrized testing?
- Guidance for using statsExpressions to customize plots?
- In case of `NA`, show it in the label instead of a blank space
- revdep issues with insight HOT 1
- Use `safe_model_parameters()` in `tidy_model_parameters()` instead?
- Avoid duplicating examples
- Don't include CIs in `centrality_description()` by default
- Exact p-value calculation using Wilcoxon rank sum test HOT 1
- DRY test dataset
- Stop converting to factors
- Revep check failure for {insight} HOT 4
- i wonder if `pairwise_comparisons` can do Tukey's HSD? HOT 1
- Use `{roxyglobals}` HOT 1
- Rename `stats_type_switch()` to `extract_stats_type()`
- wilcoxon test default parameters modification HOT 1
- Fix failures on R-devel
- Necessity of patch-level version bumps in dependencies HOT 1
- Introduce parameters to pass extra arguments
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from statsexpressions.