Diagnostic plots for regression and population size estimation.
Source:R/plots.R
plot.singleRStaticCountData.Rd
Simple diagnostic plots for singleRStaticCountData
class objects.
Arguments
- x
object of
singleRStaticCountData
class.- plotType
character parameter specifying type of plot to be made. The following list presents and briefly explains possible type of plots:
qq
– The quantile-quantile plot for pearson residuals (or standardized pearson residuals if these are available for the model) i.e. empirical quantiles from residuals are plotted against theoretical quantiles from standard distribution.marginal
– A plot made bymatplot
with fitted and observed marginal frequencies with labels.fitresid
– Plot of fitted linear predictors against (standardized) pearson residuals.bootHist
– Simple histogram for statistics obtained from bootstrapping (if one was performed and the statistics were saved).rootogram
– Rootogram, for full explanation see: Kleiber and Zeileis Visualizing Count Data Regressions Using Rootograms (2016), in short it is abarplot
where height is the square root of observed marginal frequencies adjusted by difference between square root of observed and fitted marginal frequencies connected by line representing fitted marginal frequencies. The less of a difference there is between the 0 line and beginning of a bar the more accurate fitt was produced by the model.dfpopContr
– Plot ofdfpopsize
against unit contribution. On the plot is y = x line i.e. what deletion effect would be if removing the unit from the model didn't effect regression coefficients. The further away the observation is from this line the more influential it is.dfpopBox
– Boxplot ofdfpopsize
for getting the general idea about the distribution of the "influence" of each unit on population size estimate.scaleLoc
– The scale - location plot i.e. square root of absolute values of (standardized) pearson residuals against linear predictors for each column of linear predictors.cooks
– Plot of cooks distance for detecting influential observations.hatplot
– Plot of hat values for each linear predictor for detecting influential observations.strata
– Plot of confidence intervals and point estimates for strata provided in...
argument
- confIntStrata
confidence interval type to use for strata plot. Currently supported values are
"normal"
and"logNormal"
.- histKernels
logical value indicating whether to add density lines to histogram.
- dfpop
TODO
- ...
additional optional arguments passed to the following functions:
For
plotType = "bootHist"
graphics::hist
– withx, main, xlab, ylab
parameters fixed.
For
plotType = "rootogram"
graphics::barplot
– withheight, offset, ylab, xlab, ylim
parameters fixed.graphics::lines
– withx, y, pch, type, lwd, col
parameters fixed.
For
plotType = "dfpopContr"
dfpopsize
– withmodel, observedPop
parameters fixed.plot.default
– withx, y, xlab, main
parameters fixed.
For
plotType = "dfpopBox"
dfpopsize
– withmodel, observedPop
parameters fixed.graphics::boxplot
– withx, ylab, main
parameters fixed.
For
plotType = "scaleLoc"
plot.default
– withx, y, xlab, ylab, main, sub
parameters fixed.
For
plotType = "fitresid"
plot.default
– withx, y, xlab, ylab, main, sub
parameters fixed.
For
plotType = "cooks"
plot.default
– withx, xlab, ylab, main
parameters fixed.
For
plotType = "hatplot"
hatvalues.singleRStaticCountData
plot.default
– withx, xlab, ylab, main
parameters fixed.
For
plotType = "strata"
stratifyPopsize.singleRStaticCountData