GeoWLS {GeoModels} | R Documentation |
WLS of Random Fields
Description
the function returns the parameters' estimates of a random field obtained by the weigthed least squares estimator.
Usage
GeoWLS(data, coordx, coordy=NULL, coordt=NULL, coordx_dyn=NULL, corrmodel,
distance="Eucl", fixed=NULL, grid=FALSE, maxdist=NULL,neighb=NULL,
maxtime=NULL, model='Gaussian', optimizer='Nelder-Mead',
numbins=NULL, radius=6371, start=NULL, weighted=FALSE)
Arguments
data |
A |
coordx |
A numeric ( |
coordy |
A numeric vector giving 1-dimension of
spatial coordinates; |
coordt |
A numeric vector giving 1-dimension of
temporal coordinates. Optional argument, the default is |
coordx_dyn |
A list of |
corrmodel |
String; the name of a correlation model, for the
description (see |
distance |
String; the name of the spatial distance. The default is |
fixed |
A named list giving the values of the parameters that
will be considered as known values. The listed parameters for a
given correlation function will be not estimated, i.e. if
|
grid |
Logical; if |
maxdist |
A numeric value denoting the maximum distance, see
Details in |
neighb |
Numeric; an optional positive integer indicating the
order of neighborhood. See Details and |
maxtime |
Numeric; an optional positive value indicating the maximum
temporal lag considered.See Details and |
model |
String; the type of random field. |
optimizer |
String; the optimization algorithm
(see |
numbins |
A numeric value denoting the numbers of bins, see the Section Details |
radius |
Numeric; a value indicating the radius of the sphere when using the great circle distance. Default value is the radius of the earth in Km (i.e. 6371) |
start |
A named list with the initial values of the
parameters that are used by the numerical routines in maximization
procedure. |
weighted |
Logical; if |
Details
The numbins
parameter indicates the number of adjacent
intervals to consider in order to grouped distances with which to
compute the (weighted) lest squares.
The maxdist
parameter indicates the maximum distance below which
the shorter distances will be considered in the calculation of
the (weigthed) least squares.
Value
Returns an object of class WLS
.
An object of class WLS
is a list containing
at most the following components:
bins |
Adjacent intervals of grouped distances; |
bint |
Adjacent intervals of grouped temporal separations |
centers |
The centers of the bins; |
coordx |
The vector or matrix of spatial coordinates; |
coordy |
The vector of spatial coordinates; |
coordt |
The vector of temporal coordinates; |
convergence |
A string that denotes if convergence is reached; |
corrmodel |
The correlation model; |
data |
The vector or matrix of data; |
distance |
The type of spatial distance; |
fixed |
The vector of fixed parameters; |
iterations |
The number of iteration used by the numerical routine; |
maxdist |
The maximum spatial distance used for the calculation of the variogram used in least square estimation. If no spatial distance is specified then it is NULL; |
maxtime |
The maximum temporal distance used for the calculation of the variogram used in least square estimation. If no temporal distance is specified then it is NULL; |
message |
Extra message passed from the numerical routines; |
model |
The type of random fields; |
numcoord |
The number of spatial coordinates; |
numtime |
The number the temporal realisations of the random field; |
param |
The vector of parameters' estimates; |
variograms |
The empirical spatial variogram; |
variogramt |
The empirical temporal variogram; |
variogramst |
The empirical spatial-temporal variogram; |
weighted |
A logical value indicating if its the weighted method; |
wls |
The value of the least squares at the minimum. |
Author(s)
Moreno Bevilacqua, moreno.bevilacqua89@gmail.com,https://sites.google.com/view/moreno-bevilacqua/home, Víctor Morales Oñate, victor.morales@uv.cl, https://sites.google.com/site/moralesonatevictor/, Christian", Caamaño-Carrillo, chcaaman@ubiobio.cl,https://www.researchgate.net/profile/Christian-Caamano
References
Cressie, N. A. C. (1993) Statistics for Spatial Data. New York: Wiley.
Gaetan, C. and Guyon, X. (2010) Spatial Statistics and Modelling. Spring Verlang, New York.
See Also
Examples
library(GeoModels)
# Set the coordinates of the sites:
set.seed(211)
x <- runif(200, 0, 1)
set.seed(98)
y <- runif(200, 0, 1)
coords <- cbind(x,y)
################################################################
###
### Example 1. Least square fitting of a Gaussian random field
### with exponential correlation.
###
###############################################################
# Set the model's parameters:
corrmodel <- "Exponential"
mean <- 0
sill <- 1
nugget <- 0
scale <- 0.15/3
param <- list(mean=0,sill=sill, nugget=nugget, scale=scale)
# Simulation of the Gaussian random field:
set.seed(2)
data <- GeoSim(coordx=coords, corrmodel=corrmodel, param=param)$data
fixed=list(nugget=0,mean=mean)
start=list(scale=scale,sill=sill)
# Least square fitting of the random field:
fit <- GeoWLS(data=data,coordx=coords, corrmodel=corrmodel,
fixed=fixed,start=start,maxdist=0.5)
# Results:
print(fit)