make_local_lik {convoSPAT}R Documentation

Constructor functions for local parameter estimation.

Description

This function generates another function to be used within optim to obtain maximum likelihood estimates of covariance (and possibly mean) parameters. The function includes options for (1) maximum likelihood ("ml") vs. restricted maximum likelihood ("reml"), (2) smoothness (kappa): models without smoothness vs. estimating the smoothness vs. using fixed smoothness, (3) locally isotropic vs. locally anisotropic, and (4) fixed nugget variance (tausq): fixed vs. estimated.

Usage

make_local_lik(
  locations,
  cov.model,
  data,
  Xmat,
  nugg2.var = matrix(0, nrow(locations), nrow(locations)),
  tausq = 0,
  kappa = 0.5,
  fixed = rep(FALSE, 6),
  method = "reml",
  local.aniso = TRUE,
  fix.tausq = FALSE,
  fix.kappa = FALSE
)

Arguments

locations

A matrix of locations.

cov.model

String; the covariance model.

data

A vector or matrix of data to use in the likelihood calculation.

Xmat

The design matrix for the mean model.

nugg2.var

Fixed values for the variance/covariance of the second nugget term; defaults to a matrix of zeros.

tausq

Scalar; fixed value for the nugget variance (when fix.tausq = TRUE).

kappa

Scalar; fixed value for the smoothness (when fix.kappa = TRUE).

fixed

Logical vector of FALSE values; length corresponds to the number of parameters to be estimated.

method

Indicates the estimation method, either maximum likelihood ("ml") or restricted maximum likelihood ("reml").

local.aniso

Logical; indicates if the local covariance should be anisotropic (TRUE) or isotropic (FALSE). Defaults to TRUE.

fix.tausq

Logical; indicates whether the default nugget term (tau^2) should be fixed (TRUE) or estimated (FALSE). Defaults to FALSE.

fix.kappa

Logical; indicates if the kappa parameter should be fixed (TRUE) or estimated (FALSE). Defaults to FALSE (only valid for cov.model = "matern" and cov.model = "cauchy").

Value

This function returns another function for use in optim.

Examples

## Not run: 
make_local_lik( locations, cov.model, data, Xmat )

## End(Not run)


[Package convoSPAT version 1.2.7 Index]