diagnosticPlot: diagnosticPlot produces diagnostic plots of the regression.

View source: R/cpueplots.R

diagnosticPlotR Documentation

diagnosticPlot produces diagnostic plots of the regression.

Description

diagnosticPlot produces diagnostic plots of the regression. these include a plot of the residuals agsinst the predicted values, the normal Q-Q plot, a histogram of the Observed Log(CPUE) with a fitted normal distribution, and a histogram of the predicted Log(CPUE) with a fitted normal distribution and the normal distribution from the observed data.

Usage

diagnosticPlot(
  inout,
  indat,
  inmodel = inout$Optimum,
  depend = "LnCE",
  inlabel = "",
  dorug = TRUE
)

Arguments

inout

is the list from standLM.

indat

is the data.frame used in the standardization.

inmodel

is a single number identifying the model inside 'inout' to plotted, defaults to inout's Optimum

depend

the dependent variable defaults to "LnCE"

inlabel

provides the means of giving a title to the 2 x 2 plot

dorug

default=TRUE, should the rug of points be included in the QQplot?

Value

a 2 x 2 plot of the residuals, the Q-Q plot, and the distributions of the logged observed and predicted values of CPUE.

Examples

## Not run: 
data(sps)
splabel = "Species"
sps$Year <- factor(sps$Year)
sps$Month <- factor(sps$Month)
sps$Vessel <- factor(sps$Vessel)
labelM <- c("Year","Vessel","Month")
mods <- makemodels(labelM)
out <- standLM(mods,sps,splabel)
diagnosticPlot(out,3,sps,splabel)

## End(Not run)

haddonm/rforcpue documentation built on Oct. 12, 2024, 11:55 p.m.