predict.dsspMod {DSSP} | R Documentation |
Predictions from a model with new data.
## S3 method for class 'dsspMod'
predict(object, newdata, ...)
object |
a fitted dsspMod object. |
newdata |
a data frame for which to evaluate predictions. |
... |
optional and ignored arguments. |
returns matrix with posterior densities for each row in the input data.
data("meuse.all", package = "gstat")
sp::coordinates(meuse.all) <- ~ x + y
meuse.fit <- DSSP(
formula = log(zinc) ~ 1, data = meuse.all[1:155, ], N = 100, function(x) -2 * log(1 + x),
pars = c(0.001, 0.001)
)
preds <- predict(meuse.fit, meuse.all[156:164, ])