Censored Spatial Models
Overview
It fits linear regression models for censored spatial data. It provides different estimation methods as the SAEM (Stochastic Approximation of Expectation Maximization) algorithm and seminaive that uses Kriging prediction to estimate the response at censored locations and predict new values at unknown locations. It also offers graphical tools for assessing the fitted model. More details can be found in Ordonez et al. (2018) doi:10.1016/j.spasta.2017.12.001.
Install
Health
ERRORexamplesr-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc
r-devel-linux-x86_64-fedora-clang
Running examples in ‘CensSpatial-Ex.R’ failed The error most likely occurred in: > ### Name: algnaive12 > ### Title: Naive 1 and Naive 2 method for spatial prediction. > ### Aliases: algnaive12 > ### Keywords: Spatial Censored SAEM > > ### ** Examples > > ###simulated coordinates > n<-200 ### sample size for estimation. > n1=100 ### number of observation used in the prediction. > > ###simulated coordinates > r1=sample(seq(1,30,length=400),n+n1) > r2=sample(seq(1,30,length=400),n+n1) > coords=cbind(r1,r2)### total coordinates (used in estimation and prediction). > > coords1=coords[1:n,]####coordinates used for estimation. > > type="matern"### covariance structure. > > xtot<-cbind(1,runif((n+n1)),runif((n+n1),2,3))## X matrix for estimation and prediction. > xobs=xtot[1:n,]## X matrix for estimation. > > ###simulated data > obj=rspacens(cov.pars=c(3,.3,0),beta=c(5,3,1),x=xtot,coords=coords,kappa=1.2, + cens=0.25,n=(n+n1),n1=n1,cov.model=type,cens.type="left") > > data2=obj$datare > data2[,4:5]=xobs[,-1] > > cc=obj$cc > y=obj$datare[,3] > cutoff=rep(obj$cutoff,length(y[cc==1])) > > > aux2=algnaive12(data=data2,cc=obj$cc,covar=TRUE,covar.col=4:5, + copred=obj$coords1,thetaini=c(.1,.2),y.col=3,coords.col=1:2, + fix.nugget=TRUE,nugget=0,kappa=1.2,cutoff=cutoff,trend=~V4+V5, + cov.model=type) OMP: Warning #96: Cannot form a team with 28 threads, using 2 instead. OMP: Hint Consider unsetting KMP_DEVICE_THREAD_LIMIT (KMP_ALL_THREADS), KMP_TEAMS_THREAD_LIMIT, and OMP_THREAD_LIMIT (if any are set).
r-devel-linux-x86_64-fedora-gcc
Running examples in ‘CensSpatial-Ex.R’ failed The error most likely occurred in: > ### Name: algnaive12 > ### Title: Naive 1 and Naive 2 method for spatial prediction. > ### Aliases: algnaive12 > ### Keywords: Spatial Censored SAEM > > ### ** Examples > > ###simulated coordinates > n<-200 ### sample size for estimation. > n1=100 ### number of observation used in the prediction. > > ###simulated coordinates > r1=sample(seq(1,30,length=400),n+n1) > r2=sample(seq(1,30,length=400),n+n1) > coords=cbind(r1,r2)### total coordinates (used in estimation and prediction). > > coords1=coords[1:n,]####coordinates used for estimation. > > type="matern"### covariance structure. > > xtot<-cbind(1,runif((n+n1)),runif((n+n1),2,3))## X matrix for estimation and prediction. > xobs=xtot[1:n,]## X matrix for estimation. > > ###simulated data > obj=rspacens(cov.pars=c(3,.3,0),beta=c(5,3,1),x=xtot,coords=coords,kappa=1.2, + cens=0.25,n=(n+n1),n1=n1,cov.model=type,cens.type="left") > > data2=obj$datare > data2[,4:5]=xobs[,-1] > > cc=obj$cc > y=obj$datare[,3] > cutoff=rep(obj$cutoff,length(y[cc==1])) > > > aux2=algnaive12(data=data2,cc=obj$cc,covar=TRUE,covar.col=4:5, + copred=obj$coords1,thetaini=c(.1,.2),y.col=3,coords.col=1:2, + fix.nugget=TRUE,nugget=0,kappa=1.2,cutoff=cutoff,trend=~V4+V5, + cov.model=type)
NOTECRAN incoming feasibilityr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Maintainer: ‘Alejandro Ordonez <ordonezjosealejandro@gmail.com>’
No Authors@R field in DESCRIPTION.
Please add one, modifying
Authors@R: c(person(given = "Alejandro",
family = "Ordonez",
role = c("aut", "cre"),
email = "ordonezjosealejandro@gmail.com"),
person(given = c("Christian", "E."),
family = "Galarza",
role = "aut"),
person(given = c("Victor", "H."),
family = "Lachos",
role = "aut"))
as necessary.NOTEdependencies in R coder-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc
Namespace in Imports field not imported from: ‘Rcpp’ All declared Imports should be used.
- ERROR9 OK, 2 NOTE, 2 ERRORNow
- ERROR10 OK, 2 NOTE, 2 ERROR2026-03-10
Documentation
- Help pages
- 15
- Examples that run
- 53%8 run in a plain check · 7 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 100%
- Documented parameters
- 95%
- Return-value docs
- 100%
- Help pages citing references
- 100%
Downloads
Dependencies
Code & Tests
Datasets
People & History
Maintainer since 1.0 (2016)
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 3.6Latest
- 3.52023-01-17 · diff ↗
- unarchivedReturned to CRAN2022-08-15
- 3.02022-08-15 · diff ↗
- archivedRemoved from CRAN2022-05-04requires archived package 'geoR'
- RR 4.2.0 released · 2022-04-22
- 2.592021-10-16 · diff ↗
- RR 4.1.0 released · 2021-05-18
- unarchivedReturned to CRAN2020-05-04
- 2.582020-05-04 · diff ↗
- RR 4.0.0 released · 2020-04-24
- archivedRemoved from CRAN2020-02-03check issues were not corrected in time Requires orphaned package 'geoR'
Show 9 earlier eventsHide 9 earlier events
Package metadata
- First published
- 2016-10-08
- Total releases
- 10 / 10 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 4.1.0
- Bundled data
- 2.4 KB / 2 files
- Download size
- 73 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("CensSpatial")Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.