require(geoR)
data("Missouri")
data=Missouri[1:70,]
data$V3=log((data$V3))
cc=data$V5
y=data$V3
datare1=data
coords=datare1[,1:2]
data1=data.frame(coords,y)
data1=data1[cc==0,]
geodata=as.geodata(data1,y.col=3,coords.col=1:2)
v=variog(geodata)
v1=variofit(v)
cov.ini=c(0,2)
est=SAEMSCL(cc,y,cens.type="left",trend="cte",coords=coords,M=15,perc=0.25,MaxIter=5,pc=0.2,
cov.model="exponential",fix.nugget=TRUE,nugget=2,inits.sigmae=cov.ini[2],inits.phi=cov.ini[1],
search=TRUE,lower=0.00001,upper=50)
d1=derivQfun(est)
d1$QI
Run the code above in your browser using DataLab