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!
# 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, ...)
A manyglm object
Whether all the Y variables should be labelled
Which X covariates should be included in the plot. Defaults to all except intercept.
Which Y variables should be included in the plot. Defaults to all.
Whether the intercept coefficient should be included.
A plotting parameter. The default is 0.5.
Plotting parameter
Plotting parameter
Other plotting parameters
none
# 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