[R-sig-Geo] dimensions do not match

Edzer Pebesma edzer.pebesma at uni-muenster.de
Mon Apr 7 12:42:28 CEST 2008


Thanks Mathieu, for sending me the data off-line.

If you have a massive data set, you should use kriging within a local 
neighbourhood to prevent forming and inverting a covariance matrix of 
4.3 Gb (24067 records, squared, times 8 bytes per double). You may try 
to convince the author of automap to take care of this, automatically.

When applying local kriging to your data set, I get the error message:

 > k = krige(valeur~1,sitesR,mask_SG,vgm(1, "Exp",300), nmax=30)
[using ordinary kriging]

"chfactor.c", line 130: singular matrix in function LDLfactor()
Error in predict.gstat(g, newdata = newdata, block = block, nsim = nsim,  :
  LDLfactor

which is usually, and in this case as well, due to duplicate 
observations, try

 > zerodist(sitesR)

Does automap take care of them, and if yes how?
--
Edzer



mathieu grelier wrote:
> Ok, this is the data I use and the commands.
> It is really weird because I use R CMD within grass and I can't
> reproduce exactly the same error message when I follow the commands
> directly in R.
> This is the message I get now :
>
> "memory.c", line 57: can't allocate memory in function m_get()
> Error in predict.gstat(g, newdata = newdata, block = block, nsim = nsim,  :
>         m_get
>
> But, I already had this memory error when working on big datasets.
> In the same way, I looked on the archives to see if this memory
> problem could be solved and I didn't find anything.
>
> Do you know it?
> Thanks.
>
> Mathieu
>
>
> 2008/4/6, Edzer Pebesma <edzer.pebesma at uni-muenster.de>:
>   
>> Please send me the data as a .RData R data file, along with the steps that
>> led to the error message.
>>  --
>>  Edzer
>>
>>  mathieu grelier wrote:
>>
>>     
>>> A question about a problem already described in this list (
>>>
>>>       
>> https://stat.ethz.ch/pipermail/r-sig-geo/2006-July/001160.html),
>> but I
>>     
>>> didn't find any answer.
>>> I am trying to achieve ordinary kriging using gstat (via the autokrige
>>> package) in GRASS with a big dataset (24067 points).
>>>
>>> After the program removes duplicate data, I get the following same error :
>>> "Error : dimensions do not match: locations 39916 and data 24067"
>>> I don't have any NAs apparently.
>>> Checking logfile, I could see that the error is occurring in the krige
>>> function.
>>>
>>> Is there a known way to fix this problem?
>>> Maybe I can send my data, but I don't send it for now to the list as its
>>> weight is ~1Mo.
>>>
>>> Thanks
>>> Mathieu
>>>
>>>        [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> R-sig-Geo mailing list
>>> R-sig-Geo at stat.math.ethz.ch
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>
>>>
>>>       
> >




More information about the R-sig-Geo mailing list