Hello every one,
    I estimate the regional snow water equivalent using cokriging ( my data
set has more than 70,000 data points).  All the things run finely and
quickly. However, once I run the predict.gstat function it takes much time,
but it doesn't work and have no results.  Would any one please be able to
give a solution for this? Any advice regarding this highly appreciated.
    I have found some persons could get a better result by changing the
nmax. I do it like this way, but it still does not work. Can any one tell
me the reasons.
   Another problem: When fitting a variogram model, a problem occures
"non-positive
definite coefficient matrix in structure 1Warning: No Intrinsic Correlation
or Linear Model of Coregionalization found Reason: coefficient matrix not
positive definite"

The following code is:

dem<-readGDAL('dem_mask_001.tif')
pts2<-readShapePoints('pts.shp')
pts2@proj4string<-dem@proj4string
pts2$dem<-over(pts2,dem)$band1

pts2.utm <- spTransform(pts2, CRS('+proj=utm +zone=32 +ellps=WGS84
+datum=WGS84 +units=m +no_defs'))

predictor<-readGDAL('dem_mask_001.tif')

predictor$dem <- predictor$band1
predictor$band1 <- NULL

predictor<-as(predictor,"SpatialPointsDataFrame")
predictor$lon<-predictor@coords[,1]
predictor$lat<-predictor@coords[,2]

predictor.utm <- spTransform(predictor, CRS('+proj=utm +zone=32
+ellps=WGS84 +datum=WGS84 +units=m +no_defs'))

g <- gstat(id="variable", formula = variable~1, data = pts2.utm,set =
list(nocheck = 1))
v.fit <- fit.variogram(variogram(g), vgm(102022244,"Exp",175064.8,0))

#Fit a model variogram to all the variograms:
g1 <- gstat(id="variable", formula = variable~1, data = pts2.utm)
g1 <- gstat(g1,id="dem", formula = dem~1, data = pts2.utm)

vm <- variogram(g1)
vm.fit <- fit.lmc(vm, g1, model=v.fit)

####### prediction############
cok <- predict.gstat(vm.fit, predictor.utm)   ###  it does not work
cok2 <- predict(vm.fit,predictor,nmax=5,nmin=3)     #### it still does not
work

	[[alternative HTML version deleted]]

