Learn R Programming

mvabund (version 4.2.1)

coefplot.manyglm: Plots the coefficients of the covariates of a manyglm object with confidence intervals.

Description

A way to plot the coefficients of the covariates of a manyglm object. Modifies code from Niku, Hui and Taskinen's coefplot.gllvm. If you have a large number of terms in your model, consider using which.Xcoef to choose just a few to plot. Default behaviour will try to plot everything, which would be a pretty big figure!

Usage

# S3 method for manyglm
coefplot(object, y.label = TRUE, which.Xcoef = NULL,
  which.Ys = NULL, incl.intercept = FALSE, cex.ylab = 0.5, mfrow = NULL,
  mar = NULL, ...)

Arguments

object

A manyglm object

y.label

Whether all the Y variables should be labelled

which.Xcoef

Which X covariates should be included in the plot. Defaults to all except intercept.

which.Ys

Which Y variables should be included in the plot. Defaults to all.

incl.intercept

Whether the intercept coefficient should be included.

cex.ylab

A plotting parameter. The default is 0.5.

mfrow

Plotting parameter

mar

Plotting parameter

...

Other plotting parameters

Value

none

See Also

manyglm, summary.manyglm.

Examples

Run this code
# NOT RUN {
## Load the hunting spider data set
data(spider)
spiddat <- mvabund(spider$abund)
#To fit a log-linear model assuming counts are negative binomial:
glm.spid <- manyglm(spiddat~., data=spider$x, family="negative.binomial")
# A coefplot of soil.dry and bare.sand parameters:
coefplot.manyglm(glm.spid, which.Xcoef=2:3) # note which.Xcoef=1 is the intercept
# }

Run the code above in your browser using DataLab