plotCI {BranchGLM}R Documentation

Plot Confidence Intervals

Description

Creates a plot to display confidence intervals.

Usage

plotCI(
  CIs,
  points = NULL,
  ylab = "",
  ylas = 2,
  cex.y = 1,
  decreasing = FALSE,
  ...
)

Arguments

CIs

a numeric matrix of confidence intervals, must have exactly 2 columns. The variable names displayed in the plot are taken from the column names.

points

points to be plotted in the middle of the CIs, typically means or medians. The default is to plot the midpoints of the intervals.

ylab

a label for the y-axis.

ylas

the style of the y-axis label, see more about this at las in par.

cex.y

font size used for variable names on y-axis.

decreasing

a logical value indicating if confidence intervals should be displayed in decreasing or increasing order according to points. Can use NA if no ordering is desired.

...

further arguments passed to plot.default.

Value

This only produces a plot, nothing is returned.

Examples

Data <- iris
### Fitting linear regression model
mymodel <- BranchGLM(Sepal.Length ~ ., data = Data, family = "gaussian", link = "identity")

### Getting confidence intervals
CIs <- confint.default(mymodel, level = 0.95)
xlim <- c(min(CIs), max(CIs))

### Plotting CIs
par(mar = c(5, 7, 3, 1) + 0.1)
plotCI(CIs, main = "95% Confidence Intervals", xlim = xlim, cex.y = 0.9, 
xlab = "Beta Coefficients")
abline(v = 0)


[Package BranchGLM version 2.1.6 Index]