#Simple graph for confidence intervals using the t-distribution
gr1 <- group(x="program", y="los", z="month", dataf=hosprog, dist="t",
increment=3, rolling=6)
# Group level confidence intervals
plot(x=gr1, y="group", order="numeric", lwd=4, gcol= "blue", pcol="red",
overall=TRUE, oband=TRUE, ocol="gray", tcol="green", tgt=4.5,
cex=1, cex.axis=1, cex.lab=1, cex.text=2,
cex.main=1.25, name=TRUE, adj.alpha=.2)
#Trend plots over time in the 3 month increments (i.e., quarters)
plot(x=gr1, y="time", lwd=4, gcol=c("red", "blue"), gband=TRUE, overall=TRUE,
oband=TRUE, ocol="gray", tcol="green", tgt=4, tpline=3,
tpcol="yellow", name=TRUE, cex.axis=1, cex.lab=1, cex.text=2,
cex.main=1.25, adj.alpha=.3)
#Plot for rolling 6-month averages
plot(x=gr1, y="roll", lwd=4, gcol=c("red", "blue"), gband=TRUE, overall=TRUE,
oband=TRUE, ocol="gray", tcol="green", tgt=4, tpline=c(4,6),
tpcol="yellow", name=TRUE, cex.axis=1, cex.lab=1, cex.text=2,
cex.main=1.25, adj.alpha=.3)
Run the code above in your browser using DataLab