algnaive12 {CensSpatial} R 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 \sigma^2 and \phi 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 \tau^2 parameter must be fixed. nugget (numeric) values of the \tau^2 parameter, if fix.nugget=F this value corresponds to an initial value. kappa value of \kappa used in some covariance functions. cutoff (vector) Limit of censure detection ( rc:>cutoff, lc:

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 (\beta, \sigma^2, \phi, \tau^2) in the Naive 1 method. theta2 vector of estimate parameter for the mean and covariance structure (\beta, \sigma^2, \phi, \tau^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.

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)



[Package CensSpatial version 3.6 Index]