Used to estimate spatial covariance parameters for a few different spatial models.
Estimated parameters can then be used in predict.slmfit()
to predict values at unobserved locations.
estcovparm(
response,
designmatrix,
xcoordsvec,
ycoordsvec,
CorModel = "Exponential",
estmethod = "REML",
covestimates = c(NA, NA, NA)
)
a list with
parms.est
, a vector of estimated covariance parameters
Sigma
, the fitted covariance matrix for all of the sites
qrV
, the qr decomposition
b.hat
, the vector of estimated fixed effect coefficients
covbi
, the inverse of the covariance matrix for the fixed effects
covb
, the covariance matrix for the fixed effects
min2loglik
, minus two times the loglikelihood
a vector of a response variable, possibly with missing values.
is the matrix of covariates used to regress the response on.
is a vector of x coordinates
is a vector of y coordinates
is the covariance structure. By default,
CorModel
is "Exponential"
but other options are
"Spherical"
and "Gaussian"
.
is either the default "REML"
for restricted
maximum likelihood to estimate the covariance parameters and
regression coefficients or "ML"
to estimate the covariance
parameters and regression coefficients.
is an optional vector of covariance parameter estimates (nugget, partial sill, range). If these are given and estmethod = "None"
, the the provided vector are treated as the estimators to create the covariance structure.
The function is a helper function used internally in predict.slmfit()
.