spatial.pred.linear.MLE: Spatial predictions for the geostatistical Linear Gaussian...

Description Usage Arguments Value Author(s)

View source: R/foo.R

Description

This function performs spatial prediction, fixing the model parameters at the maximum likelihood estimates of a linear geostatistical model.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
spatial.pred.linear.MLE(
  object,
  grid.pred,
  predictors = NULL,
  predictors.samples = NULL,
  type = "marginal",
  scale.predictions = c("logit", "prevalence", "odds"),
  quantiles = c(0.025, 0.975),
  n.sim.prev = 0,
  standard.errors = FALSE,
  thresholds = NULL,
  scale.thresholds = NULL,
  messages = TRUE,
  include.nugget = FALSE
)

Arguments

object

an object of class "PrevMap" obtained as result of a call to linear.model.MLE.

grid.pred

a matrix of prediction locations.

predictors

a data frame of the values of the explanatory variables at each of the locations in grid.pred; 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.

predictors.samples

a list of data frame objects. This argument is used to average over repeated simulations of the predictor variables in order to obtain an "average" map over the distribution of the explanatory variables in the model. Each component of the list is a simulation. The number of simulations passed through predictors.samples must be the same as n.sim.prev. NOTE: This argument can currently only be used only for a linear regression model that does not use any approximation of the spatial Gaussian process.

type

a character indicating the type of spatial predictions: type="marginal" for marginal predictions or type="joint" for joint predictions. Default is type="marginal". In the case of a low-rank approximation only marginal predictions are available.

scale.predictions

a character vector of maximum length 3, indicating the required scale on which spatial prediction is carried out: "logit", "prevalence" and "odds". Default is scale.predictions=c("logit","prevalence","odds").

quantiles

a vector of quantiles used to summarise the spatial predictions.

n.sim.prev

number of simulation for non-linear predictive targets. Default is n.sim.prev=0.

standard.errors

logical; if standard.errors=TRUE, then standard errors for each scale.predictions are returned. Default is standard.errors=FALSE.

thresholds

a vector of exceedance thresholds; default is thresholds=NULL.

scale.thresholds

a character value indicating the scale on which exceedance thresholds are provided; "logit", "prevalence" or "odds". Default is scale.thresholds=NULL.

messages

logical; if messages=TRUE then status messages are printed on the screen (or output device) while the function is running. Default is messages=TRUE.

include.nugget

logical; if include.nugget=TRUE then the nugget effect is included in the predictions. This option is available only for fitted linear models with locations having multiple observations. Default is include.nugget=FALSE.

Value

A "pred.PrevMap" object list with the following components: logit; prevalence; odds; exceedance.prob, corresponding to a matrix of the exceedance probabilities where each column corresponds to a specified value in thresholds; grid.pred prediction locations; samples, corresponding to the predictive samples of the linear predictor (only if any(scale.predictions=="prevalence")). Each of the three components logit, prevalence and odds is also a list with the following components:

predictions: a vector of the predictive mean for the associated quantity (logit, odds or prevalence).

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: If n.sim.prev > 0, the function returns n.sim.prev samples of the linear predictor at each of the prediction locations.

Author(s)

Emanuele Giorgi e.giorgi@lancaster.ac.uk

Peter J. Diggle p.diggle@lancaster.ac.uk


PrevMap documentation built on Oct. 7, 2021, 5:07 p.m.