group.CI.Rd
Calculates the confidence interval of grouped data
group.CI(x, data, ci = 0.95)
A data frame consisting of one column for each grouping factor plus three columns for the upper bound, mean and lower bound of the confidence interval for each level of the grouping factor
require(latticeExtra)
#> Loading required package: latticeExtra
with(group.CI(weight~feed,chickwts),
segplot(feed~weight.lower+weight.upper,center=weight.mean)
)
require(Hmisc)
#> Loading required package: Hmisc
#>
#> Attaching package: ‘Hmisc’
#> The following objects are masked from ‘package:plyr’:
#>
#> is.discrete, summarize
#> The following objects are masked from ‘package:base’:
#>
#> format.pval, units
with(group.CI(Temp~Month,airquality),
xYplot(Cbind(Temp.mean,Temp.lower,Temp.upper)~numericScale(Month),type="b",ylim=c(60,90))
)