predSCL: Prediction for the SAEM algorithm for censored spatial data.

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

View source: R/predSCLfin.R

Description

This function uses the parameters estimates from SAEM to predict values at unknown locations through the MSE criterion assuming normal distribution.

Usage

1
predSCL(xpred, coordspred, est)

Arguments

xpred

values of the x design matrix for prediction coordinates.

coordspred

points coordinates to be predicted.

est

object of the class SAEMSpatialCens (see SAEMSCL function).

Details

This function predicts using the Mean Square of error (MSE) criterion, that is, it takes the conditional expectation E(Y|X) as the predictor that minimizes the MSE.

Value

prediction

prediction value.

indpred

indicator for the observed and predicted values (0:observed,1:predicted).

sdpred

standard deviation for prediction.

coordspred

points coordinates predicted.

coordsobs

observed coordinates.

Author(s)

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

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

References

DELYON, B., LAVIELLE, M.,ANDMOULI NES, E. (1999). Convergence of a stochastic approximation version of the EM algorithm.Annals of Statistic-s27, 1, 94-128.

Diggle, P. & Ribeiro, P. (2007). Model-Based Geostatistics. Springer Series in Statistics.

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
38
39
40
41
42
43
44
## Not run: 


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)### coordinates for estimation and prediction.

coords1=coords[1:n,]####coordinates used in estimation.

cov.ini=c(0.2,0.1)###initial values for phi and sigma2.

type="matern"
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.
beta=c(5,3,1)

###simulated data
obj=rspacens(cov.pars=c(3,.3,0),beta=beta,x=xtot,coords=coords,kappa=1.2,cens=0.25,
n=(n+n1),n1=n1,cov.model=type,cens.type="left")

data2=obj$datare
cc=obj$cc
y=obj$datare[,3]
coords=obj$datare[,1:2]


#######SAEMSpatialCens object########

est=SAEMSCL(cc,y,cens.type="left",trend="other",x=xobs,coords=coords,kappa=1.2,M=15,
perc=0.25,MaxIter=10,pc=0.2,cov.model="exponential",fix.nugget=TRUE,nugget=0,
inits.sigmae=cov.ini[2],inits.phi=cov.ini[1],search=TRUE,lower=0.00001,upper=50)


coordspred=obj$coords1
xpred=xtot[(n+1):(n+n1),]
h=predSCL(xpred,coordspred,est)

## End(Not run)

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