Learn R Programming

EnviroStat (version 0.4-2)

Falternate3: Simultaneous coordinate and variogram estimation

Description

Perform simultaneous estimation of coords and exponential or gaussian variogram by alternating weighted least squares.

Usage

Falternate3(disp, coords, model = 1, a0 = 0.1, t0 = 0.5, max.iter = 50, max.fcal = 100, alter.lim = 50, tol = 1e-05, prt = 0, dims = 2, lambda = 0, ncoords, dev.mon = NULL, verbose = FALSE)

Arguments

disp
$n \times n$ dispersion matrix, equal to $2 - 2 (spatial correlation matrix)$
coords
$n \times 2$ coordinate matrix
model
type of variogram: 1 for exponential or 2 for gaussian
a0, t0
initial variogram parameter estimates
max.iter, max.fcal
control parameter for calls to non-linear optimization routines (same values used in MDS step and in variogram step)
alter.lim
maximum number of iterations of pairs of alternating calls to Fmdsfit3 (coordinate estimation) and Fvariogfit3 (variogram fitting)
tol
convergence criterion for coordinate estimates
prt
not used
dims
dimension of multi-dimensional scaling
lambda
smoothing parameter
ncoords
$n \times 2$ optional initial coordinates to use if not G-plane
dev.mon
Function to open the graphics device used for plots monitoring the convergence of objective. If NULL, monitoring plots will not be created.
verbose
if TRUE, display the results of each iteration to the console

Value

A list containing the following named components:
variogfit
Fitted variogram parameters with new locations
ncoords
$n\times 2$ matrix with coordinates of new locations

Warning

make sure that coords are scaled reasonably small before attempting to compute; otherwise matrix inversion is likely not to work in calculation of bending energy matrix.

Details

This version permits dimension > 2 for scaling. In the plotting we'll use a plot symbol proportional to the third coordinate.