Aniso_fit
estimates the parameters of the stationary spatial model.
Required inputs are the observed data and locations.
Optional inputs include the covariance model (exponential is the default).
Aniso_fit(
sp.SPDF = NULL,
coords = NULL,
data = NULL,
cov.model = "exponential",
mean.model = data ~ 1,
fixed.nugg2.var = NULL,
method = "reml",
fix.tausq = FALSE,
tausq = 0,
fix.kappa = FALSE,
kappa = 0.5,
local.pars.LB = NULL,
local.pars.UB = NULL,
local.ini.pars = NULL
)
A "SpatialPointsDataFrame
" object, which contains the
spatial coordinates and additional attribute variables corresponding to the
spatoal coordinates
An N x 2 matrix where each row has the two-dimensional coordinates of the N data locations.
A vector or matrix with N rows, containing the data values. Inputting a vector corresponds to a single replicate of data, while inputting a matrix corresponds to replicates. In the case of replicates, the model assumes the replicates are independent and identically distributed.
A string specifying the model for the correlation
function; defaults to "exponential"
.
Options available in this package are: "exponential
",
"matern"
, or "gaussian"
.
An object of class formula
,
specifying the mean model to be used. Defaults to an intercept only.
Optional; describes the variance/covariance for a fixed (second) nugget term (represents a known error term). Either a vector of length N containing a station-specific variances (implying independent error) or an NxN covariance matrix (implying dependent error). Defaults to zero.
Indicates the estimation method, either maximum likelihood
("ml"
) or restricted maximum likelihood ("reml"
).
Logical; indicates whether the default nugget term
(tau^2) should be fixed (TRUE
) or estimated (FALSE
). Defaults to
FALSE
.
Scalar; fixed value for the nugget variance (when
fix.tausq = TRUE
).
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"
).
Scalar; value of the kappa parameter. Only used if
fix.kappa = TRUE
.
Optional vectors of lower and upper
bounds, respectively, used by the "L-BFGS-B"
method option in the
optim
function for the local parameter estimation.
Each vector must be of length five,
containing values for lam1, lam2, tausq, sigmasq, and nu. Default for
local.pars.LB
is rep(1e-05,5)
; default for
local.pars.UB
is c(max.distance/2, max.distance/2, 4*resid.var, 4*resid.var, 100)
,
where max.distance
is the maximum interpoint distance of the
observed data and resid.var
is the residual variance from using
lm
with mean.model
.
Optional vector of initial values used by the
"L-BFGS-B"
method option in the optim
function for the local parameter estimation. The vector must be of length
five, containing values for lam1, lam2, tausq, sigmasq, and nu. Defaults
to c(max.distance/10, max.distance/10, 0.1*resid.var, 0.9*resid.var, 1)
,
where max.distance
is the maximum interpoint distance of the
observed data and resid.var
is the residual variance from using
lm
with mean.model
.
A list with the following components:
Table of local maximum likelihood estimates for each mixture component location.
Observed data values.
Vector of generalized least squares estimates of beta, the mean coefficients.
Covariance matrix of the generalized least squares estimate of beta.
"Regression table" for the mean coefficient estimates, listing the estimate, standard error, and t-value.
Estimated covariance matrix (N.obs
x N.obs
)
using all relevant parameter estimates.
Cholesky of Cov.mat
(i.e., chol(Cov.mat)
),
the estimated covariance matrix (N.obs
x N.obs
).
Vector of MLEs for the anisotropy parameters lam1, lam2, eta.
2 x 2 anisotropy matrix, calculated from
aniso.pars
.
Scalar maximum likelihood estimate of tausq (nugget variance).
Scalar maximum likelihood estimate of sigmasq (process variance).
Scalar maximum likelihood estimate for kappa (when applicable).
N x N matrix with the fixed variance/covariance for the second (measurement error) nugget term (defaults to zero).
String; the correlation model used for estimation.
N x 2 matrix of observation locations.
Scalar value of the maximized likelihood from the global optimization (if available).
Design matrix, obtained from using lm
with mean.model
.
Logical, indicating if kappa was fixed (TRUE
) or
estimated (FALSE
).
Scalar; fixed value of kappa.
# NOT RUN {
# Using iid standard Gaussian data
aniso.fit <- Aniso_fit( coords = cbind(runif(100), runif(100)),
data = rnorm(100) )
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab