Hi there, I wonder if anyone can help me. I'm trying to use bargraph.CI in the Sciplot package when there is a missing combination of the factor levels. Unfortunately the standard errors on the plot do not appear to be correct.
Consider an analysis consisting of two factors A and B. When all factor level combinations are present all appears fine: library(sciplot) #all data response<-c(32,54,32,65,34,65,65,45,54,23,43,23,76,87,65,45) factorA<-c("A","A","A","A","A","A","A","A","B","B","B","B","B","B","B","B") factorB<-c("a","a","a","a","b","b","b","b","a","a","a","a","b","b","b","b") data<-data.frame(response,factorA,factorB) bargraph.CI(x.factor = data$factorB,data$response, group=data$factorA, legend=TRUE) but when I remove a combination of the two factors the error whiskers appear to be on the wrong bars: #excluding one combination response<-c(34,65,65,45,54,23,43,23,76,87,65,45) factorA<-c("A","A","A","A","B","B","B","B","B","B","B","B") factorB<-c("b","b","b","b","a","a","a","a","b","b","b","b") data<-data.frame(response,factorA,factorB) bargraph.CI(x.factor = data$factorB,data$response, group=data$factorA, legend=TRUE) I had a look at the ci.fun options but with no success. Thanks in advance for any ideas Simon -- View this message in context: http://www.nabble.com/Problem-with-bargraph.CI-in-Sciplot-package-tp22995415p22995415.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.