estcovparm: Estimate Covariance Parameters

Description Usage Arguments Details Value

View source: R/utils.R

Description

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.

Usage

1
2
3
4
5
6
7
8
9
estcovparm(
  response,
  designmatrix,
  xcoordsvec,
  ycoordsvec,
  CorModel = "Exponential",
  estmethod = "REML",
  covestimates = c(NA, NA, NA)
)

Arguments

response

a vector of a response variable, possibly with missing values.

designmatrix

is the matrix of covariates used to regress the response on.

xcoordsvec

is a vector of x coordinates

ycoordsvec

is a vector of y coordinates

CorModel

is the covariance structure. By default, CorModel is "Exponential" but other options are "Spherical" and "Gaussian".

estmethod

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.

covestimates

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.

Details

The function is a helper function used internally in predict.slmfit().

Value

a list with


sptotal documentation built on July 6, 2021, 5:07 p.m.