residuals.dsspMod | R Documentation |
dsspMod
modelGet residuals from dsspMod
model
## S3 method for class 'dsspMod' residuals(object, newdata, robust = TRUE, ...)
object |
an object of class |
newdata |
a data frame for which to estimate residuals. |
robust |
whether or not to use median (rather than mean) of posterior density to as estimate calculate residuals. |
... |
additional arguments which are ignored. |
vector containing residuals with same length as rows in data used.
library(sp) library(gstat) data(meuse.all) coordinates(meuse.all) <- ~ x + y f <- function(x) -x ## log-prior for exponential distribution for the smoothing parameter ## Draw 100 samples from the posterior of eta given the data y. OUTPUT <- DSSP( formula = log(zinc) ~ 1, data = meuse.all, N = 100, pars = c(0.001, 0.001), log_prior = f ) residuals(OUTPUT)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.