Re: [R] Calculations with aggregate data: confidence intervals

2014-03-25 Thread arun
Hi Luigi, You could also use: library(Rmisc)  group.CI(copy~stimulation,my.data)[,-3] A.K. On Tuesday, March 25, 2014 6:19 AM, Jorge I Velez wrote: Hi Luigi, Thanks for sending the data in reproducible format.  Perhaps something like this? aggregate(my.data[,3], list(my.data[,2]), FUN = f

Re: [R] Calculations with aggregate data: confidence intervals

2014-03-25 Thread Jorge I Velez
Hi Luigi, Thanks for sending the data in reproducible format. Perhaps something like this? aggregate(my.data[,3], list(my.data[,2]), FUN = function(x) t.test(x)$ conf.int[1:2]) #Group.1 x.1 x.2 #1 Unstimulated 5.296492e+02 2.410510e+03 #2ESAT6 9.105338e+00 4.078

[R] Calculations with aggregate data: confidence intervals

2014-03-25 Thread Luigi Marongiu
Dear all, I would like to calculate the confidence intervals on aggregate data. I know how to do this using the t test, but it did not work together with the aggregate function. Is there a function that can be applied to the aggregate function to obtain the (95%) confidence intervals, rather than a