formula: An object of class formula providing a symbolic description of the model to be fitted. See Details of this function and lm.
data: A data frame containing the response, covariates, and location coordinates.
coordnames: The columns of data containing the spatial coordinates, provided as a formula (e.g., ~ x + y), column numbers (e.g., c(1, 2)), or column names (e.g., c("x", "y"))
mod: A model object produced by one of the cmod_* functions, e.g., cmod_std.
weights: An optional vector of weights for the errors to be used in the fitting process. A vector that is proportional to the reciprocal variances of the errors, i.e., errors are assumed to be uncorrelated with variances evar/weights. Default is NULL, meaning that the weights are uniformly 1.
mu: A single numeric value indicating the consant mean of the spatial process if simple kriging is desired. Default is NULL, meaning that ordinary or universal kriging should be used.
longlat: A logical indicating whether Euclidean (FALSE) or Great Circle distance (WGS84 ellipsoid) (longlat = TRUE) should be used. Default is FALSE.
cmod: Retained for backwards compatibility. A model object produced by one of the cmod_* functions, e.g., cmod_std.
Returns
Returns a geolm_* object, where *
depends on mod.
Details
Note: for the multiresolution Gaussian process model, if cmod$est == "f" (i.e., if the nugget is finescale instead of measurement error), then the weights
argument is internally set to rep(1, n), where n is the number of observations.
formula should be specified after the form y ~ x1 + x2, where y is the response variable and x1 and x2 are the covariates of interest. If mu is provided, the variables to the right of ~ are ignored.