predict.dsspMod {DSSP} | R Documentation |
Predictions from a model with new data.
Description
Predictions from a model with new data.
Usage
## S3 method for class 'dsspMod'
predict(object, newdata, ...)
Arguments
object |
a fitted dsspMod object. |
newdata |
a data frame for which to evaluate predictions. |
... |
optional and ignored arguments. |
Value
returns matrix with posterior densities for each row in the input data.
Examples
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, ])
[Package DSSP version 0.1.1 Index]