简体   繁体   English

在ggplot2中使用不同的置信区间mean_cl_boot

[英]Use a different confidence interval in ggplot2 mean_cl_boot

ggplot2 uses Hmisc:smean_cl_boot in its stat_summary as ggplot2在其stat_summary使用Hmisc:smean_cl_boot stat_summary作为

stat_summary(fun.data = mean_cl_boot, geom = "pointrange")

Is it possible to specify a 90% confidence interval instead of the default 95? 是否可以指定90%的置信区间,而不是默认的95? In Hmisc::smean_cl_boot it is an option, but I don't know how to pass it through the ggplot2 syntax. Hmisc::smean_cl_boot这是一个选项,但我不知道如何通过ggplot2语法传递它。 I prefer not to define a custom function. 我不想定义一个自定义函数。

You can use the fun.args argument of stat_summary to pass arguments to the function. 您可以使用fun.args的说法stat_summary传递参数的功能。

Try: 尝试:

stat_summary(fun.data = mean_cl_boot, geom = "pointrange",fun.args=list(conf.int=.9))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM