You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using stat_summary(fun.data = "mean_cl_boot"), bootstrapped means and confidence intervals are produced. The bootstraps are set to 1000, this leads to the means and CIs slightly changing between runs. Below are two runs of the same code, each has slightly different estimates:
You can already pass additional arguments to the summary function by passing a list to the fun.args argument.
As mean_cl_boot() is just a wrapper for Hmisc::smean.cl.boot(), you can increase B to get a more stable estimate like this:
Alternatively, you can use fun.data = ~mean_cl_boot(.x, B = 10e3) to achieve the same outcome.
In addition, you can use set.seed() to fix the effects of the random number generator.
As there are already methods to change the number of bootstraps, I'll close this issue.
When using
stat_summary(fun.data = "mean_cl_boot")
, bootstrapped means and confidence intervals are produced. The bootstraps are set to 1000, this leads to the means and CIs slightly changing between runs. Below are two runs of the same code, each has slightly different estimates:Reproducible code:
This can lead to meaningful changes in estimates depending on the data used and how large the changes are between iterations.
Is it possible to add a feature where you can edit the number of bootstraps so they can be increased, making results more stable?
The text was updated successfully, but these errors were encountered: