This function performs spatial prediction, fixing the model parameters at the maximum likelihood estimates of a linear geostatistical model.
spatial.pred.lm.ps(
object,
grid.pred = NULL,
predictors = NULL,
predictors.intensity = NULL,
control.mcmc = NULL,
target = 3,
type = "marginal",
quantiles = NULL,
standard.errors = FALSE,
messages = TRUE,
return.samples = FALSE
)
an object of class "PrevMap" obtained as result of a call to linear.model.MLE
.
a matrix of prediction locations. Default is grid.pred=NULL
, in which case the grid used to approximate the intractable integral in the log-Gaussian Cox process model is used for prediction.
a data frame of the values of the explanatory variables at each of the locations in grid.pred
, for the response variable model; each column correspond to a variable and each row to a location. Warning: the names of the columns in the data frame must match those in the data used to fit the model. Default is predictors=NULL
for models with only an intercept.
a data frame of the values of the explanatory variables at each of the locations in grid.pred
, for the log-Gaussian Cox process model; each column correspond to a variable and each row to a location. Warning: the names of the columns in the data frame must match those in the data used to fit the model. Default is predictors=NULL
for models with only an intercept.
output from control.mcmc.MCML
which defined the control parameters of the Monte Carlo Markv chain algorithm.
an integeter indicating the predictive target: target=1
if the predictive target is the linear predictor of the response; target=2
is the predictive target is the sampling intensity of the preferentially sampled data; target=3
if both of the above are the predictive targets. Default is target=3
.
a character indicating the type of spatial predictions for target=1
: type="marginal"
for marginal predictions or type="joint"
for joint predictions. Default is type="marginal"
. Note that predictions for the sampling intensity (target=2
) are always joint.
a vector of quantiles used to summarise the spatial predictions.
logical; if standard.errors=TRUE
, then standard errors for each scale.predictions
are returned. Default is standard.errors=FALSE
.
logical; if messages=TRUE
then status messages are printed on the screen (or output device) while the function is running. Default is messages=TRUE
.
logical; if return.samples=TRUE
a matrix of the predictive samples for the prediction target (as specified in target
) are returned in the output.
A "pred.PrevMap.ps" object list with the following components: response
(if target=1
or target=3
) and intensity
(if target=2
pr target=3
).
grid.pred
prediction locations.
Each of the components intensity
and response
is a list with the following components:
predictions
: a vector of the predictive mean for the corresponding target.
standard.errors
: a vector of prediction standard errors (if standard.errors=TRUE
).
quantiles
: a matrix of quantiles of the resulting predictions with each column corresponding to a quantile specified through the argument quantiles
.
samples
: a matrix corresponding to the predictive samples of the predictive target (only if return.samples=TRUE
), with each row corresponding to a samples and column to a prediction location.
In the case of a model with a mix of preferential and non-preferential data, if target=1
or target=3
, each of the above components will be a list with two components,
namely preferential
and non.preferential
, associated with response
.