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

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/algnaive12fin.R

Description

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

Usage

1
2
algnaive12(data, cc, copred, thetaini, y.col = 3,coords.col = 1:2,covar=F, covar.col,
fix.nugget = T, nugget, kappa = 0, 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.

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.

Author(s)

Alejandro Ordonez <<[email protected]>>, Victor H. Lachos <<[email protected]>> and Christian E. Galarza <<[email protected]>>

Maintainer: Alejandro Ordonez <<[email protected]>>

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
## Not run: 

n<-200 ### sample size for estimation.
n1=100 ### number of observation used for prediction.

###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]

aux2=algnaive12(data=data2,cc=obj$cc,covar=T,covar.col=4:5,
copred=obj$coords1,thetaini=c(.1,.2),y.col=3,coords.col=1:2,
fix.nugget=T,nugget=0,kappa=1.2,trend=~V4+V5,cov.model=type)


## End(Not run)

CensSpatial documentation built on May 30, 2017, 8:24 a.m.