解释"stat_summary = mean_cl_boot".在ggplot2? [英] Interpretation of "stat_summary = mean_cl_boot" at ggplot2?

查看:142
本文介绍了解释"stat_summary = mean_cl_boot".在ggplot2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个简单的问题 我试图制作一个错误图,类似于Field的使用R发现统计信息"第532页中所示.

a perhaps simple question I tried to make an errorgraph like the one shown in page 532 of Field's "Discovering Statistics Using R".

可在此处找到代码 http://www.sagepub.com/dsur/study/DSUR%20R%20Script%20Files/Chapter%2012%20DSUR%20GLM3.R :

line <- ggplot(gogglesData, aes(alcohol, attractiveness, colour = gender))
line + stat_summary(fun.y = mean, geom = "point") + 
stat_summary(fun.y = mean, geom = "line", aes(group= gender)) + 
stat_summary(fun.data = mean_cl_boot, geom = "errorbar", width = 0.2) + 
labs(x = "Alcohol Consumption", y = "Mean Attractiveness of Date (%)", colour = "Gender")  

我产生了相同的图;我的y轴变量只有4个点(它是一个不连续的标度,为1-4),现在y轴具有点1.5、2、2.5,线在其中变化.

I produced the same graph; my y-axis variable has only 4-points (it is a discrete scale, 1-4), now the y-axis has the points 1.5, 2, 2.5 in which the lines vary.

问题是:这些点和图描述了什么? 我认为重要的是stat_summary(fun.data = mean_cl_boot, geom = "errorbar", width = 0.2)他们是该小组和那个水平(x轴)的观察值吗?它们是频率吗?还是比例?

And the question is: what do these points and graphs describe? I assume that the important part is stat_summary(fun.data = mean_cl_boot, geom = "errorbar", width = 0.2) are they count of observations for that group and that level(x-axis)? Are they frequencies? Or, are they proportions?

我找到了这个 http://docs.ggplot2.org/0.9.3/stat_summary.html但这对我没有帮助

I found this http://docs.ggplot2.org/0.9.3/stat_summary.html but it did not help me

谢谢

推荐答案

以下是ggplot2 说到mean_cl_boot()

Here is what the ggplot2 book on page 83 says about mean_cl_boot()

Function          Hmisc original        Middle Range
mean_cl_boot() smean.cl.boot() Mean Standard error from bootstrap

我认为它是Hmisc包中的smean.cl.boot(),但在ggplot2中重命名为mean.cl.boot().

I think that it is the smean.cl.boot() from Hmisc package but renamed as mean.cl.boot() in ggplot2.

此处是原始语言的定义Hmisc包中的功能:

and here is the definition of original function from Hmisc package :

smean.cl.boot是基本的非参数引导程序的非常快速的实现,用于在不假设正态性的情况下获得总体均值的置信度限制

smean.cl.boot is a very fast implementation of the basic nonparametric bootstrap for obtaining confidence limits for the population mean without assuming normality

这篇关于解释"stat_summary = mean_cl_boot".在ggplot2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆