algnaive12: Naive 1 and Naive 2 method for spatial prediction.

View source: R/algnaive12fin.R

algnaive12R Documentation

Naive 1 and Naive 2 method for spatial prediction.

Description

This function performs spatial censored estimation and prediction for left and right censure through the Naive 1 and Naive 2 methods.

Usage

algnaive12(data, cc, copred, thetaini, y.col = 3,coords.col = 1:2,covar=FALSE, covar.col,
fix.nugget = TRUE, nugget, kappa = 0, cutoff, cov.model = "exponential", trend)

Arguments

data

data.frame containing the coordinates, covariates and the response variable (in any order).

cc

(binary vector) indicator of censure (1: censored observation 0: observed).

copred

coordinates used in the prediction procedure.

thetaini

initial values for the σ^2 and φ values in the covariance structure.

y.col

(numeric) column of data.frame that corresponds to the response variable.

coords.col

(numeric) columns of data.frame that corresponds to the coordinates of the spatial data.

covar

(logical) indicates the presence of covariates in the spatial censored estimation (FALSE :without covariates, TRUE :with covariates).

covar.col

(numeric) columns of data.frame that corresponds to the covariates in the spatial censored linear model estimation.

fix.nugget

(logical) it indicates if the τ^2 parameter must be fixed.

nugget

(numeric) values of the τ^2 parameter, if fix.nugget=F this value corresponds to an initial value.

kappa

value of κ used in some covariance functions.

cutoff

(vector) Limit of censure detection ( rc:>cutoff, lc:<cutoff).

cov.model

structure of covariance (see cov.spatial from geoR).

trend

it specifies the mean part of the model. See documentation of trend.spatial from geoR for further details. By default it takes "cte".

Details

The Naive 1 and Naive 2 are computed as in Schelin (2014). The naive 1 replaces the censored observations by the limit of detection (LD) and it performs estimation and prediction with this data. Instead of 1, the naive 2 replaces the censored observations by LD/2.

Value

beta1

beta parameter for the mean structure in the Naive 1 method.

beta2

beta parameter for the mean structure in the Naive 2 method.

theta1

vector of estimate parameter for the mean and covariance structure (β, σ^2, φ, τ^2) in the Naive 1 method.

theta2

vector of estimate parameter for the mean and covariance structure (β, σ^2, φ, τ^2) in the Naive 2 method.

predictions1

predictions obtained for the Naive 1 method.

predictions2

predictions obtained for the Naive 2 method.

AIC1

AIC of the estimated model in the Naive 1 method.

AIC2

AIC of the estimated model in the Naive 2 method.

BIC1

BIC of the estimated model in the Naive 1 method.

BIC2

BIC of the estimated model in the Naive 2 method.

loglik1

log likelihood for the estimated model in the Naive 1 method.

loglik2

log likelihood for the estimated model in the Naive 2 method.

sdpred1

standard deviations of predictions in the Naive 1 method.

sdpred2

standard deviations of predictions in the Naive 2 method.

type

covariance function used in estimation.

trend1

trend form for the mean structure.

Author(s)

Alejandro Ordonez <<ordonezjosealejandro@gmail.com>>, Victor H. Lachos <<hlachos@ime.unicamp.br>> and Christian E. Galarza <<cgalarza88@gmail.com>>

Maintainer: Alejandro Ordonez <<ordonezjosealejandro@gmail.com>>

References

Schelin, L. & Sjostedt-de Luna, S. (2014). Spatial prediction in the presence of left-censoring. Computational Statistics and Data Analysis, 74.

See Also

SAEMSCL

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)

summary(aux2)


CensSpatial documentation built on Feb. 16, 2023, 6:15 p.m.