GeoNA function

Deleting NA values (missing values) from a spatial or spatio-temporal dataset.

Deleting NA values (missing values) from a spatial or spatio-temporal dataset.

The function deletes NA values from a spatial or spatio-temporal dataset UTF-8

GeoNA(data, coordx, coordy=NULL,coordz=NULL, coordt=NULL, coordx_dyn=NULL, grid=FALSE, X=NULL, setting="spatial")

Arguments

  • data: A dd-dimensional vector (a single spatial realisation) or a (dxdd x d)-matrix (a single spatial realisation on regular grid) or a (txdt x d)-matrix (a single spatial-temporal realisation) or an (dxdxtd x d x t)-array (a single spatial-temporal realisation on regular grid) giving the data.

  • coordx: A numeric (dx2d x 2)-matrix or (dx3d x 3)-matrix Coordinates on a sphere for a fixed radius radius

    are passed in lon/lat format expressed in decimal degrees.

  • coordy: A numeric vector giving 1-dimension of spatial coordinates; Optional argument, the default is NULL.

  • coordz: A numeric vector giving 1-dimension of spatial coordinates; Optional argument, the default is NULL.

  • coordt: A numeric vector giving 1-dimension of temporal coordinates; the default is NULL

    then a spatial random field is expected.

  • coordx_dyn: A list of mm numeric (dx2d x 2)-matrices containing dynamical (in time) spatial coordinates. Optional argument, the default is NULL

  • grid: Logical; if FALSE (the default) the data are interpreted as spatial or spatial-temporal realisations on a set of non-equispaced spatial sites (irregular grid).

  • X: Numeric; Matrix of spatio(temporal) covariates in the linear mean specification.

  • setting: String; are data spatial, spatio-temporal or spatial bivariate (respectively spatial, spacetime, bivariate)

Returns

Returns a list containing the following components: - coordx: A dd-dimensional vector of spatial coordinates;

  • coordy: A dd-dimensional vector of spatial coordinates;

  • coordt: A tt-dimensional vector of temporal coordinates;

  • data: The data without NAvalues

  • grid: TRUE if the spatial data are observed in a regular grid, otherwise FALSE;

  • perc: The percentage of NA values .

  • setting: Are data of spatial or spatio-temporal or spatial bivariate type

  • X: Covariates matrix

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

Examples

library(GeoModels) # Define the spatial-coordinates of the points: set.seed(79) x = runif(200, 0, 1) y = runif(200, 0, 1) coords=cbind(x,y) # Set the exponential cov parameters: corrmodel = "Matern" mean=0 sill=1 nugget=0 scale=0.3/3 smooth=0.5 param=list(mean=mean,sill=sill,nugget=nugget,scale=scale,smooth=smooth) # Simulation of the spatial Gaussian random field: data = GeoSim(coordx=coords, corrmodel=corrmodel, param=param)$data data[1:100]=NA # removing NA a=GeoNA(data,coordx=coords) a$perc # percentage of NA values #a$coordx# spatial coordinates without missing values #a$data # data without missinng values
  • Maintainer: Moreno Bevilacqua
  • License: GPL (>= 3)
  • Last published: 2025-01-14