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
|
kappa |
Scalar; fixed value for the smoothness (when |
fixed |
Logical vector of |
method |
Indicates the estimation method, either maximum likelihood ( |
local.aniso |
Logical; indicates if the local covariance should be
anisotropic ( |
fix.tausq |
Logical; indicates whether the default nugget term
(tau^2) should be fixed ( |
fix.kappa |
Logical; indicates if the kappa parameter should be
fixed ( |
Value
This function returns another function for use in optim
.
Examples
## Not run:
make_local_lik( locations, cov.model, data, Xmat )
## End(Not run)