{"id":32202949,"url":"https://github.com/rubenfcasal/npsp","last_synced_at":"2026-02-21T12:01:50.725Z","repository":{"id":131369241,"uuid":"64307277","full_name":"rubenfcasal/npsp","owner":"rubenfcasal","description":"npsp: Nonparametric Spatial Statistics","archived":false,"fork":false,"pushed_at":"2024-11-09T01:50:49.000Z","size":50942,"stargazers_count":4,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-09T11:57:29.525Z","etag":null,"topics":["geostatistics","r-package","spatial-data-analysis","statistics"],"latest_commit_sha":null,"homepage":"https://rubenfcasal.github.io/npsp","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rubenfcasal.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-27T12:39:28.000Z","updated_at":"2024-11-09T01:50:53.000Z","dependencies_parsed_at":"2024-11-09T01:35:47.141Z","dependency_job_id":null,"html_url":"https://github.com/rubenfcasal/npsp","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/rubenfcasal/npsp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenfcasal%2Fnpsp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenfcasal%2Fnpsp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenfcasal%2Fnpsp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenfcasal%2Fnpsp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubenfcasal","download_url":"https://codeload.github.com/rubenfcasal/npsp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenfcasal%2Fnpsp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29680147,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T11:29:27.227Z","status":"ssl_error","status_checked_at":"2026-02-21T11:29:20.292Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["geostatistics","r-package","spatial-data-analysis","statistics"],"created_at":"2025-10-22T04:22:54.676Z","updated_at":"2026-02-21T12:01:50.720Z","avatar_url":"https://github.com/rubenfcasal.png","language":"HTML","readme":"---\noutput: github_document\n---\n\n\u003c!-- \nREADME.md is generated from README.Rmd. \nPlease edit that file \n--\u003e\n\n```{r include=FALSE}\n# Create .nojekyll file in the /docs folder\nfile.create('docs/.nojekyll')\n# devtools::check() \n# pkgdown::build_site()\n# pkgdown::build_reference()\n# pkgdown::build_articles()\n```\n\nnpsp: Nonparametric spatial (geo)statistics\n============================================\n\n### `r paste(\"Version\", packageVersion(\"npsp\"))`\n\nThis package implements nonparametric methods \nfor inference on multidimensional spatial (or spatio-temporal) processes,\nwhich may be (especially) useful in (automatic) geostatistical modeling and interpolation.\n\n\n```{r echo=FALSE, results='asis'}\nif ('github_document' == rmarkdown::all_output_formats(knitr::current_input()) \u0026\u0026 !knitr:::is_html_output()) \n   cat('For more information visit the [web page](https://rubenfcasal.github.io/npsp) of the package.')\n```\n\n\nMain functions\n--------------\n\nNonparametric methods for inference on both spatial trend \nand variogram functions:\n\n*  `np.fitgeo()` (automatically) fits an isotropic nonparametric geostatistical model \n    by estimating the trend and the variogram (using a bias-corrected estimator) iteratively \n    (by calling `h.cv()`, `locpol()`, `np.svariso.corr()` and `fitsvar.sb.iso()` at each iteration).\n\n*  `locpol()`, `np.den()` and `np.svar()` use local polynomial kernel smoothing to compute\n   nonparametric estimates of a multidimensional regression function (e.g. a spatial trend),\n   a probability density function or a semivariogram (or their first derivatives), respectively. \n   Estimates of these functions can be constructed for any dimension \n   (depending on the amount of available memory). \n   \n*  `np.svariso.corr()` computes a bias-corrected nonparametric semivariogram estimate \n   using an iterative algorithm similar to that described in \n   Fernandez-Casal and Francisco-Fernandez (2014). \n   This procedure tries to correct the bias due to the direct use of residuals \n   (obtained, in this case, from a nonparametric estimation of the trend function) \n   in semivariogram estimation.\n\n* `fitsvar.sb.iso()` fits a ‘nonparametric’ isotropic Shapiro-Botha variogram model by WLS. \n   Currently, only isotropic semivariogram estimation is supported.\n\n\nNonparametric residual kriging (sometimes called external drift kriging):\n\n* `np.kriging()` computes residual kriging predictions  \n   (and the corresponding simple kriging standard errors).\n\n* `kriging.simple()` computes simple kriging predictions and standard errors.\n\n*  Currently, only global (residual) simple kriging is implemented.  \n   Users are encouraged to use `gstat::krige()` (or `gstat::krige.cv()`) \n   together with `as.vgm()` for local kriging.\n\n\nOther functions\n---------------\n\nAmong the other functions intended for direct access by the user, the following \n(methods for multidimensional linear binning, local polynomial kernel regression, \ndensity or variogram estimation) could be emphasized: \n`binning()`, `bin.den()`, `svar.bin()`, `h.cv()` and `interp()`. \nThere are functions for plotting data joint with a legend representing a continuous color scale\n(based on `fields::image.plot()`):\n\n*  `splot()` allows to combine a standard R plot with a legend. \n\n*  `spoints()`, `simage()` and `spersp()` draw the corresponding high-level plot \n   with a legend strip for the color scale.\n   \nThere are also some functions which can be used to interact with other packages. For instance, `as.variogram()` (geoR) or `as.vgm()` (gstat).\n\nSee the [Reference](https://rubenfcasal.github.io/npsp/reference/index.html) for the complete list of functions.\n\n\nInstallation\n------------\n\n`npsp` is available from CRAN, but you can install the development version from github with:\n\n```{r install, eval=FALSE}\n# install.packages(\"devtools\")\ndevtools::install_github(\"rubenfcasal/npsp\")\n```\n\nNote also that, as this package requires compilation, Windows users need to have previously installed the appropriate version of [Rtools](https://cran.r-project.org/bin/windows/Rtools/), and OS X users need to have installed [Xcode](https://apps.apple.com/us/app/xcode/id497799835).\n\nAlternatively, Windows users may install the corresponding *npsp_X.Y.Z.zip* file in the [releases section](https://github.com/rubenfcasal/npsp/releases/latest) of the github repository.\n\nFor R versions 4.4.x under Windows:\n```{r install-win, eval=FALSE}\ninstall.packages('https://github.com/rubenfcasal/npsp/releases/download/v0.7-14/npsp_0.7-14.zip',\n                 repos = NULL)\n``` \n\nAuthor\n------\n\n[Ruben Fernandez-Casal](https://rubenfcasal.github.io) (Dep. Mathematics, University of A Coruña, Spain). \nPlease send comments, error reports or suggestions to [rubenfcasal@gmail.com](mailto:rubenfcasal@gmail.com).\n\n\nAcknowledgments\n---------------\n\nImportant 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).\n\nThis 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.\n\n\nReferences\n----------\n\n* Castillo-Páez S., Fernández-Casal R.  and García-Soidán P. (2019). [A nonparametric bootstrap method for spatial data](https://doi.org/10.1016/j.csda.2019.01.017), **137**, *Comput. Stat. Data Anal.*, 1-15. \n\n* Fernández-Casal, R., Castillo-Páez, S. and Francisco-Fernandez, M. (2024). [Nonparametric Conditional Risk Mapping Under Heteroscedasticity](https://doi.org/10.1007/s13253-023-00555-0), *JABES*, **29**, 56-72.\n\n* Fernández-Casal R., Castillo-Páez S. and Francisco-Fernández M. (2018). [Nonparametric geostatistical risk mapping](https://doi.org/10.1007/s00477-017-1407-y), *Stoch. Environ. Res. Ris. Assess.*, **32**, 675-684.\n\n* Fernández-Casal R., Castillo-Páez S. and García-Soidán P. (2017). [Nonparametric estimation of the small-scale variability of heteroscedastic spatial processes](https://doi.org/10.1016/j.spasta.2017.04.001), *Spa. Sta.*, **22**, 358-370.\n\n* Fernandez-Casal R. and Francisco-Fernandez M. (2014). [Nonparametric bias-corrected variogram estimation under non-constant trend](https://doi.org/10.1007/s00477-013-0817-8), *Stoch. Environ. Res. Ris. Assess.*, **28**, 1247-1259.\n\n* Fernandez-Casal R., Gonzalez-Manteiga W. and Febrero-Bande M. (2003). [Flexible Spatio-Temporal Stationary Variogram Models](https://doi.org/10.1023/A:1023204525046), *Statistics and Computing*, **13**, 127-136.\n\n* Rupert D. and Wand M.P. (1994). Multivariate locally weighted least squares regression. *The Annals of Statistics*, **22**, 1346-1370.\n\n* Shapiro A. and Botha J.D. (1991). Variogram fitting with a general class of conditionally non-negative definite functions. *Computational Statistics and Data Analysis*, **11**, 87-96.\n\n* Wand M.P. (1994). Fast Computation of Multivariate Kernel Estimators. *Journal of Computational and Graphical Statistics*, **3**, 433-445.\n\n* Wand M.P. and Jones M.C. (1995). *Kernel Smoothing*. Chapman and Hall, London.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubenfcasal%2Fnpsp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubenfcasal%2Fnpsp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubenfcasal%2Fnpsp/lists"}