estimate.geolm_cmodStd {gear}R Documentation

Determine MLEs of model parameters for a geostatistical model

Description

estimate estimates the parameters of a geostatistical linear model of class geolm_cmodStd using maximum likelihood estimation.

Usage

## S3 method for class 'geolm_cmodStd'
estimate(
  object,
  reml = FALSE,
  noise_type = "e",
  lower = NULL,
  upper = NULL,
  method = "nlminb",
  itnmax = NULL,
  control = list(),
  est_nugget = TRUE,
  est_par3 = TRUE,
  est_angle = FALSE,
  est_ratio = FALSE,
  verbose = FALSE,
  ...
)

Arguments

object

A geostatistical linear model object produced by the geolm function.

reml

A logical value indicating whether standard maximum likelihood estimation should be performed (reml = FALSE). If reml = TRUE, then restricted maximum likelihood estimation is performed. The default is FALSE.

noise_type

A character vector indicating the type of noise (nugget) variance to estimate. The default is est = "e", indicating the error variance should be estimated. Alternatively, the user can specify est = "f", indicating that the finescale (microscale) variance should be estimated. The other type of noise variance is set to 0, otherwise the model is not identifiable. See Details.

lower

A named list with the names of the parameters you wish to set lower bounds for and the associated value. See Details.

upper

A named list with the names of the parameters you wish to set upper bounds for and the associated value.

method

The optimization method. The default is "nlminb". "L-BFGS-B" is another acceptable choice. See optimx for further choices.

itnmax

An integer indicating the maximum number of iterations to allow for the optimization procedure.

control

A list of control parameters passed internally to optimx.

est_nugget

A logical value indicating whether the nugget variance (evar or fvar) should be estimated. The default is TRUE, indicating that the nugget should be estimated.

est_par3

A logical value indicating whether par3 should be estimated (for an appropriate covariance model such as "matern" or "amatern"). The default is TRUE, indicating that this parameter should be estimated.

est_angle

A logical value indicating whether the geometric anisotropy angle should be estimated. The default is FALSE, indicating that this parameter should not be estimated.

est_ratio

A logical value indicating whether the geometric anisotropy ratio of minor axis length to major axis length should be estimated. The default is FALSE, indicating that this parameter should not be estimated.

verbose

A logical value indicating whether potentially informative messages should be printed. The default is FALSE.

...

Currently unimplemented

Details

The optimx function is used to find the MLEs. The control argument of optimx has a parameter kkt related to checking optimality conditions. This is internally set to FALSE. See optimx for Details.

Only the sum of evar and fvar is identifiable. Depending on the choice of noise_type, the covariance model is internally updated to estimate only one type of noise. e.g., if noise_type = "e", then internally we update evar so that evar = evar + fvar and fvar = 0. Estimation is then performed on evar alone. Alternatively, the analagous estimated would be made for fvar if noise_type = "fvar".

When est_nugget is true, the likelihood is profiled to simplify the optimization problem. In that case a parameter lambda = (evar + fvar)/psill is optimized. The optimal psill and noise variance are then determined.

The lower argument should be a named list with the names of the parameters you wish to set lower bounds for. If not specified, an attempt is made to specify reasonable lower bounds. The current choices are r = 0.001, psill = 0.001, lambda = 0, angle = 0, ratio = 0.001, par3 = 0.001.

The upper argument should be a named list with the names of the parameters you wish to set upper bounds for. If not specified, an attempt is made to specify reasonable upper bounds. The current choices are r = 5 * maximum intercentroid distance, psill = 5 * var(object$y), lambda = 5, angle = 179.99, ratio = 1, par3 = 3.

Author(s)

Joshua French

See Also

cmod_std, optimx

Examples

data(toydata, package = "gear")
# setup standard covariance model
mod_std = cmod_std("exponential", psill = 1, r = 1, evar = 0.1)
# setup  dataframe with data
# fit Std geolm
object = geolm(y ~ x1 + x2, data = toydata, mod = mod_std,
                  coordnames = c("x1", "x2"))
est_object = estimate(object, control = list(trace = 1),
                      verbose = TRUE,
                      lower = list(r = 0.05, lambda = 0.05))

[Package gear version 0.3.4 Index]