SAEMSCL {CensSpatial} | R Documentation |
SAEM Algorithm estimation for censored spatial data.
Description
It estimates the parameters for a linear spatial model with censored observations
Usage
SAEMSCL(cc, y, cens.type="left", trend = "cte", LI = NULL, LS = NULL, x = NULL, coords,
kappa = 0, M = 20, perc = 0.25, MaxIter = 300, pc = 0.2, cov.model = "exponential",
fix.nugget = TRUE, nugget, inits.sigmae, inits.phi, search = FALSE, lower, upper)
Arguments
cc |
(binary vector) indicator of censure (1: censored observation 0: observed). |
y |
(vector) corresponds to response variable. |
cens.type |
type of censure ( |
trend |
linear trends options: |
LI |
(vector) lower limit, if cens.type= |
LS |
(vector) upper limit, if |
x |
design matrix. |
coords |
corresponds to the coordinates of the spatial data (2D coordinates). |
kappa |
value of kappa used in some covariance functions. |
M |
number of montecarlo samples for stochastic aproximation. |
perc |
percentage of burn-in on the Monte Carlo sample. Default=0.25. |
MaxIter |
maximum of iterations for the algorithm. |
pc |
percentage of initial iterations of the SAEM algorithm. (Default=0.2). |
cov.model |
covariance Structure (see, |
fix.nugget |
(logical) indicates if the |
nugget |
if |
inits.sigmae |
corresponds to initial value for |
inits.phi |
corresponds to initial value for |
search |
(logical) this argument gives bounds where the optim routine can find the solution that maximizes the Maximum likelihood expectation. If |
lower |
(vector or numeric) lower bound from the optim solution. If |
upper |
(vector or numeric) upper bound from the optim solution. If |
Details
The estimation process was computed via SAEM algorithm initially proposed by Deylon et. al.(1999). This is a stochastic approximation of the EM procedure. This procedure circunvent the heavy computational time involved in the MCEM procedure necessary for estimating phi and tau2 parameters (when tau2 is not fixed) since there is not an analytical solution. The search interval was proposed because sometimes the maximization procedure used by optim function does not work for large intervals.
Value
beta |
estimated |
sigma2 |
estimated |
phi |
estimated |
nugget |
estimated or fixed |
Theta |
estimated parameters in all iterations ( |
loglik |
log likelihood for SAEM method. |
AIC |
Akaike information criteria. |
BIC |
Bayesian information criteria. |
AICcorr |
corrected AIC by the number of parameters. |
X |
design matrix. |
Psi |
estimated covariance matrix. |
theta |
final estimation of |
uy |
stochastic approximation of the first moment for the truncated normal distribution. |
uyy |
stochastic approximation of the second moment for the truncated normal distribution. |
cc |
indicator of censure (0:observed, 1: censored). |
type |
covariance structure considered in the model. |
kappa |
|
coords |
coordinates of the observed data. |
iterations |
number of iterations needed to convergence. |
fitted |
fitted values for the SAEM algortihm. |
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
DELYON, B., LAVIELLE, M.,ANDMOULI NES, E. (1999). Convergence ofa 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
Examples
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)
coords1=coords[1:n,]
type="matern"
#xtot<-cbind(1,runif((n+n1)),runif((n+n1),2,3))
xtot=as.matrix(rep(1,(n+n1)))
xobs=xtot[1:n,]
beta=5
#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]
##initials values obtained from variofit.
cov.ini=c(0.13,0.86)
est=SAEMSCL(cc,y,cens.type="left",trend="cte",coords=coords,
kappa=1.2,M=15,perc=0.25,MaxIter=10,pc=0.2,cov.model=type,
fix.nugget=TRUE,nugget=0,inits.sigmae=cov.ini[1],
inits.phi=cov.ini[2],search=TRUE,lower=0.00001,upper=100)
summary(est)