From 2e1e2a153a2d193b1de1d3fe23f5f821fe8c56a1 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Mon, 22 Aug 2016 12:06:48 -0300 Subject: plot.R: added confidence interval plots. --- util.R | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'util.R') diff --git a/util.R b/util.R index 0a87079..3f1a9b8 100644 --- a/util.R +++ b/util.R @@ -13,3 +13,12 @@ dir.create.safe <- function(path, log=T) { dir.create(path) } } + +# Confidence interval stat summary +ci.fun <- function(d) { + test <- t.test(d) + ci <- test$conf.int + m <- as.double(test$estimate) + + data.frame(ymin=ci[1], ymax=ci[2], y=m) +} -- cgit v1.2.3