MyNixOS website logo
Description

Nonparametric Spatial Statistics.

Multidimensional nonparametric spatial (spatio-temporal) geostatistics. S3 classes and methods for multidimensional: linear binning, local polynomial kernel regression (spatial trend estimation), density and variogram estimation. Nonparametric methods for simultaneous inference on both spatial trend and variogram functions (for spatial processes). Nonparametric residual kriging (spatial prediction). For details on these methods see, for example, Fernandez-Casal and Francisco-Fernandez (2014) <doi:10.1007/s00477-013-0817-8> or Castillo-Paez et al. (2019) <doi:10.1016/j.csda.2019.01.017>.

npsp: Nonparametric spatial (geo)statistics

Version 0.7.13

This package implements nonparametric methods for inference on multidimensional spatial (or spatio-temporal) processes, which may be (especially) useful in (automatic) geostatistical modeling and interpolation.

Main functions

Nonparametric methods for inference on both spatial trend and variogram functions:

  • np.fitgeo() (automatically) fits an isotropic nonparametric geostatistical model by estimating the trend and the variogram (using a bias-corrected estimator) iteratively (by calling h.cv(), locpol(), np.svariso.corr() and fitsvar.sb.iso() at each iteration).

  • locpol(), np.den() and np.svar() use local polynomial kernel smoothing to compute nonparametric estimates of a multidimensional regression function (e.g. a spatial trend), a probability density function or a semivariogram (or their first derivatives), respectively. Estimates of these functions can be constructed for any dimension (depending on the amount of available memory).

  • np.svariso.corr() computes a bias-corrected nonparametric semivariogram estimate using an iterative algorithm similar to that described in Fernandez-Casal and Francisco-Fernandez (2014). This procedure tries to correct the bias due to the direct use of residuals (obtained, in this case, from a nonparametric estimation of the trend function) in semivariogram estimation.

  • fitsvar.sb.iso() fits a ‘nonparametric’ isotropic Shapiro-Botha variogram model by WLS. Currently, only isotropic semivariogram estimation is supported.

Nonparametric residual kriging (sometimes called external drift kriging):

  • np.kriging() computes residual kriging predictions
    (and the corresponding simple kriging standard errors).

  • kriging.simple() computes simple kriging predictions and standard errors.

  • Currently, only global (residual) simple kriging is implemented.
    Users are encouraged to use gstat::krige() (or gstat::krige.cv()) together with as.vgm() for local kriging.

Other functions

Among the other functions intended for direct access by the user, the following (methods for multidimensional linear binning, local polynomial kernel regression, density or variogram estimation) could be emphasized: binning(), bin.den(), svar.bin(), h.cv() and interp(). There are functions for plotting data joint with a legend representing a continuous color scale (based on fields::image.plot()):

  • splot() allows to combine a standard R plot with a legend.

  • spoints(), simage() and spersp() draw the corresponding high-level plot with a legend strip for the color scale.

There are also some functions which can be used to interact with other packages. For instance, as.variogram() (geoR) or as.vgm() (gstat).

See the Reference for the complete list of functions.

Installation

npsp is available from CRAN, but you can install the development version from github with:

# install.packages("devtools")
devtools::install_github("rubenfcasal/npsp")

Note also that, as this package requires compilation, Windows users need to have previously installed the appropriate version of Rtools, and OS X users need to have installed Xcode.

Alternatively, Windows users may install the corresponding npsp_X.Y.Z.zip file in the releases section of the github repository.

For R versions 4.2.x under Windows:

install.packages('https://github.com/rubenfcasal/npsp/releases/download/v0.7-10/npsp_0.7-10.zip',
                 repos = NULL)

Author

Ruben Fernandez-Casal (Dep. Mathematics, University of A Coruña, Spain). Please send comments, error reports or suggestions to [email protected].

Acknowledgments

Important suggestions and contributions to some techniques included here were made by Sergio Castillo-Páez (Universidad de las Fuerzas Armadas ESPE, Ecuador) and Tomas Cotos-Yañez (Dep. Statistics, University of Vigo, Spain).

This research has been supported by MINECO grant MTM2017-82724-R, and by the Xunta de Galicia (Grupos de Referencia Competitiva ED431C-2020-14 and Centro de Investigación del Sistema universitario de Galicia ED431G 2019/01), all of them through the ERDF.

References

Metadata

Version

0.7-13

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows