View source: R/plot.influenceSSN.R
plot.influenceSSN | R Documentation |
plot.influenceSSN is a generic plot function that has been adapted for influenceSSN-class objects that have been created from the residuals function.
## S3 method for class 'influenceSSN' plot(x, color.palette = NULL, nclasses = NULL, inflcol = "_resid_", breaktype = "quantile", brks=NULL, pch = 19, ...)
x |
an object of class influenceSSN. |
color.palette |
a color palette for plotting points. The default is rainbow(nclasses,
start = .66, end = .99). The number of colors should equal the number of
classes. See |
nclasses |
the number of classes for coloring the predictions (or standard errors) according to their value. The default is 10. |
inflcol |
an influence diagnostic or cross-validation variable name in the
|
breaktype |
The method for breaking the response values into classes for coloring while plotting. A character argument that must be one of "quantile" (default), "even", or "user". |
brks |
if breaktype = "user", the break values must be specified here as a vector or matrix using c(...) or cbind(...). The sorted unique values are used as break points (together with the min and max of the variable being plotted if required) |
pch |
either an integer specifying a symbol or a single character to be used as the
default in plotting points. See |
... |
arguments to be passed to methods, such as graphical parameters (see |
The plot.influenceSSN
function creates a map showing data locations that
can be color-coded according to the values of the diagnostic or influence
variables.
Maps of stream networks, with the spatial distribution of the influence or cross-validation variables shown.
Jay Ver Hoef support@SpatialStreamNetworks.com
influenceSSN-class
, residuals
, plot.SpatialStreamNetwork
# get some model fits stored as data objects data(modelFits) #NOT RUN use this one #fitSp <- glmssn(Summer_mn ~ ELEV_DEM + netID, # ssn.object = mf04p, EstMeth = "REML", family = "Gaussian", # CorModels = c("Exponential.tailup","Exponential.taildown", # "Exponential.Euclid"), addfunccol = "afvArea") #for examples only, make sure fitSp has the correct path #if you use importSSN(), path will be correct fitSp$ssn.object <- updatePath(fitSp$ssn.object, paste0(tempdir(),'/MiddleFork04.ssn')) resids <- residuals(fitSp,cross.validation = TRUE) plot(resids) ## plot using user-defined breakpoints brks <- seq(-3,2,by=1) plot(resids, nclasses = 6, inflcol = "_resid_", breaktype = "user", brks = brks, pch = 3) ## plot crossvalidation residuals plot(resids, nclasses = 6, inflcol = "_resid.crossv_")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.