From e5fdc6983abed6559f4a60e56de1579b199829dd Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 2 May 2014 15:14:54 +0200 Subject: Improve display of confidence intervals --- R/mkinparplot.R | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'R/mkinparplot.R') diff --git a/R/mkinparplot.R b/R/mkinparplot.R index 8e8de021..7a3a6d4e 100644 --- a/R/mkinparplot.R +++ b/R/mkinparplot.R @@ -38,16 +38,20 @@ mkinparplot <- function(object) { xlim = switch(type, state.optim = range(c(0, unlist(values)), na.rm = TRUE, finite = TRUE), - rates.optim = range(unlist(values), + rates.optim = range(c(0, unlist(values)), na.rm = TRUE, finite = TRUE), fractions.optim = range(c(0, 1, unlist(values)), na.rm = TRUE, finite = TRUE)) - stripchart(bpar[get(type)], xlim = xlim, - yaxt = "n", ylim = c(0.5, length(get(type)) + 0.5)) + stripchart(values["Estimate", ], + xlim = xlim, + ylim = c(0.5, length(get(type)) + 0.5), + yaxt = "n") + if (type %in% c("rates.optim", "fractions.optim")) abline(v = 0, lty = 2) + if (type %in% c("fractions.optim")) abline(v = 1, lty = 2) text(mean(xlim), 1:length(parnames), parnames, pos = 3, offset = 1) arrows(as.numeric(values["Lower", ]), 1:length(parnames), as.numeric(values["Upper", ]), 1:length(parnames), - code = 3, angle = 90, length = 0.1) + code = 3, angle = 90, length = 0.05) } par(oldpars) } -- cgit v1.2.1