[R-sig-Geo] about ST kriging
Edzer Pebesma
edzer.pebesma at uni-muenster.de
Wed Sep 21 14:45:57 CEST 2011
Hi Pinar,
it is not clear which variogram model you pass, or how your data are
laid out in space and time.
Possible causes for a non-positive definite covariance matrix include:
- a variogram model with (nearly) perfect correlation
- duplicate observations (observations having identical location AND time)
- an invalid variogram model
A small, reproducible example (data + script) would help identify the
problem.
Best regards,
--
Edzer
On 09/20/2011 11:15 AM, Pınar Aslantas Bostan wrote:
> Dear all,
>
> I am working about space-time kriging. Before I asked again about ST kriging
> but now the problem is
> different and I could not overcome it!
>
> During kriging operation I got this error:
>
>> pred = krigeST(prec~1, w, STS(grid,time,index), v)
> Error in chol.default(A$Sm, LINPACK = TRUE) :
> non-positive definite matrix in 'chol'
>
> I explained the data set below:
>
> # prec is annual precipitation measured from 257 meteorological stations
>
> # w is STSDF object
>> summary(w)
> Object of class STSDF
> [[Spatial:]]
> Object of class SpatialPoints
> Coordinates:
> min max
> Xnew 140556 1730472
> Ynew 4309064 4971309
> Is projected: NA
> proj4string : [NA]
> Number of points: 257
> [[Temporal:]]
> Index object at time
> Min. :1970-01-01 12:00:00 Min. : 1.0
> 1st Qu.:1979-07-03 00:00:00 1st Qu.:10.5
> Median :1989-01-01 12:00:00 Median :20.0
> Mean :1989-01-01 02:46:09 Mean :20.0
> 3rd Qu.:1998-07-03 00:00:00 3rd Qu.:29.5
> Max. :2008-01-01 12:00:00 Max. :39.0
> [[Data attributes:]]
> Min. 1st Qu. Median Mean 3rd Qu. Max.
> 114.5 413.7 533.6 633.0 735.6 3332.0
>
> # I used grid to obtain predictions over it. It has 25 km spatial resolution
>
> # time is temporal entity of study. It contains 39 annual observation.
>
> # index is required for STSDF, and I used this code to create index.
>> index <- cbind(as.integer(as.factor(data$Station)),
> as.integer(as.factor(data$Year)))
>
> # v is space-time variogram
>
> How can I solve the problem?
> Thank you in advance!
>
>
> Pinar Aslantas Bostan
> Research Assistant
> Department of Geodetic and
> Geographic Information Technologies (GGIT) Middle East Technical University
> 06531 Ankara/TURKEY
> aslantas at metu.edu.tr
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
--
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de
http://www.52north.org/geostatistics e.pebesma at wwu.de
More information about the R-sig-Geo
mailing list