likfit.dist: Fit of gaussian field. Modified from function likfit in geoR.

Description Usage Arguments

View source: R/geoR_dist_functions.R

Description

Fit of gaussian field. Modified from function likfit in geoR.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
likfit.dist(
  geodata,
  coords = geodata$coords,
  data = geodata$data,
  trend = "cte",
  ini.cov.pars,
  fix.nugget = FALSE,
  nugget = 0,
  fix.kappa = TRUE,
  kappa = 0.5,
  fix.lambda = TRUE,
  lambda = 1,
  fix.psiA = TRUE,
  psiA = 0,
  fix.psiR = TRUE,
  psiR = 1,
  cov.model,
  dist.mat,
  realisations,
  lik.method = "ML",
  components = TRUE,
  nospatial = TRUE,
  limits = pars.limits(),
  print.pars = FALSE,
  messages,
  ...
)

Arguments

geodata

a list containing elements coords and data as described next. Typically an object of the class "geodata". If not provided the arguments coords and data must be provided instead.

coords

an n x 2 matrix where each row has the 2-D coordinates of the n data locations. By default it takes the component coords of the argument geodata, if provided.

data

a vector with n data values. By default it takes the component data of the argument geodata, if provided.

trend

specifies the mean part of the model. See documentation of trend.spatial for further details. Defaults to "cte".

ini.cov.pars

initial values for the covariance parameters: sigma^2 (partial sill) and phi (range parameter). Typically a vector with two components. However a matrix can be used to provide several initial values. See DETAILS below.

fix.nugget

logical, indicating whether the parameter tau^2 (nugget variance) should be regarded as fixed (fix.nugget = TRUE) or should be estimated (fix.nugget = FALSE). Defaults to FALSE.

nugget

value of the nugget parameter. Regarded as a fixed value if fix.nugget = TRUE otherwise as the initial value for the minimisation algorithm. Defaults to zero.

fix.kappa

logical, indicating whether the extra parameter kappa should be regarded as fixed (fix.kappa = TRUE) or should be estimated (fix.kappa = FALSE). Defaults to TRUE.

kappa

value of the extra parameter kappa. Regarded as a fixed value if fix.kappa = TRUE otherwise as the initial value for the minimisation algorithm. Defaults to 0.5. This parameter is valid only if the covariance function is one of: "matern", "powered.exponential", "cauchy" or "gneiting.matern". For more details on covariance functions see documentation for cov.spatial.

fix.lambda

logical, indicating whether the Box-Cox transformation parameter lambda should be regarded as fixed (fix.lambda = TRUE) or should be be estimated (fix.lambda = FALSE). Defaults to TRUE.

lambda

value of the Box-Cox transformation parameter lambda. Regarded as a fixed value if fix.lambda = TRUE otherwise as the initial value for the minimisation algorithm. Defaults to 1. Two particular cases are lambda = 1 indicating no transformation and lambda = 0 indicating log-transformation.

fix.psiA

logical, indicating whether the anisotropy angle parameter psi_R should be regarded as fixed (fix.psiA = TRUE) or should be estimated (fix.psiA = FALSE). Defaults to TRUE.

psiA

value (in radians) for the anisotropy angle parameter psi_A. Regarded as a fixed value if fix.psiA = TRUE otherwise as the initial value for the minimisation algorithm. Defaults to 0. See coords.aniso for further details on anisotropy correction.

fix.psiR

logical, indicating whether the anisotropy ratio parameter psi_R should be regarded as fixed (fix.psiR = TRUE) or should be estimated (fix.psiR = FALSE). Defaults to TRUE.

psiR

value, always greater than 1, for the anisotropy ratio parameter psi_R. Regarded as a fixed value if fix.psiR = TRUE otherwise as the initial value for the minimisation algorithm. Defaults to 1. See coords.aniso for further details on anisotropy correction.

cov.model

a string specifying the model for the correlation function. For further details see documentation for cov.spatial. Reads values from an variomodel object passed to ini.cov.pars if any, otherwise defaults to the exponential model.

dist.mat

Square matrix of distances between data points

realisations

optional. Logical or a vector indicating the number of replication for each datum. For further information see DETAILS below and documentation for as.geodata.

lik.method

(formely method.lik) options are "ML" for maximum likelihood and "REML" for restricted maximum likelihood. Defaults to "ML".

components

an n x 3 data-frame with fitted values for the three model components: trend, spatial and residuals. See the section DETAILS below for the model specification.

nospatial

logical. If TRUE parameter estimates for the model without spatial component are included in the output.

limits

values defining lower and upper limits for the model parameters used in the numerical minimisation. The auxiliary function pars.limits is called to set the limits. See also Limits in DETAILS below.

print.pars

logical. If TRUE the parameters and the value of the negative log-likelihood (up to a constant) are printed each time the function to be minimised is called.

messages

logical. Indicates whether status messages should be printed on the screen (or output device) while the function is running.

...

additional parameters to be passed to the minimisation function. Typically arguments of the type control() which controls the behavior of the minimisation algorithm. For further details see documentation for the minimisation function optim.


statnmap/GeoDist documentation built on Feb. 4, 2020, 8:34 p.m.