Skip to content
Prev 181300 / 398502 Next

sciplot question

You define your own function for the confidence intervals. The function
needs to return the two values representing the upper and lower CI
values. So:

qt.fun <- function(x) qt(p=.975,df=length(x)-1)*sd(x)/sqrt(length(x))
my.ci <- function(x) c(mean(x)-qt.fun(x), mean(x)+qt.fun(x))

lineplot.CI(x.factor = dose, response = len, data = ToothGrowth,
    ci.fun=my.ci)

Manuel
On Fri, 2009-05-22 at 18:38 +0200, Jarle Bj?rgeengen wrote: