Skip to content

Allow for the addition of 95% CIs or standard errors around the pointwise estimates#988

Closed
lauredrs wants to merge 6 commits intoIndrajeetPatil:mainfrom
sidocleux:main
Closed

Allow for the addition of 95% CIs or standard errors around the pointwise estimates#988
lauredrs wants to merge 6 commits intoIndrajeetPatil:mainfrom
sidocleux:main

Conversation

@lauredrs
Copy link

With @sidocleux , in our first modifications, the confidence intervals were not visible on the graph. This may be due to the high concentration of data around the mean, which reduces the standard error and therefore the width of the confidence intervals.
We therefore chose to calculate the confidence intervals manually. We used the mean, the standard error and a normal approximation (qnorm()) to determine the lower and upper bounds of the confidence interval. Then, to display them on the graph, we used geom_errorbarh() (which displays the horizontal error bars in red). Other solutions, such as ggdist with stat_pointinterval() or stat_eye(), could have been used, but they require more configuration (choice of distribution, additional parameters).

We have also encountered a problem since version 3.4.0 of ggplot2: the size argument should no longer be used to define the thickness of lines (geom_errorbarh(), geom_line(), etc.). Instead, we use linewidth.

Here is the graph we obtained :
plot_zoom_png (1)

sidocleux and others added 6 commits March 20, 2025 10:07
…:" pour accéder à certaines fonctions internes au package.

Pas de modification majeure de la fonction, permet de prendre en main notre fonction a modifier.
…es intervalles de confiance sur les graphiques tracés avec la fonction ggdotplotstats.
@IndrajeetPatil
Copy link
Owner

Hi, thanks a lot for trying to implement this!!

I am going to close this in favour of: https://github.com/IndrajeetPatil/ggstatsplot/pull/996/files

The difference is that I am using {statsExpressions} to compute the uncertainty estimate, instead of doing it manually. This is because this estimate and uncertainty needs to be computed for parametric, non-parametric, robust, and Bayesian estimates, which the current PR doesn't cover.

Please have a look at that PR and let me know if you see any issue 😸

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.

3 participants