dimensions do not match
Hi Mathieu, As a default autoKrige deals with duplicate measurements. This is done by deleting one of them. It gives a warning message to the user that observations have been removed. This behavior can be suppressed by setting 'remove.duplicates = FALSE' in the call to autoKrige, now gstat will crash with the usual error. cheers, Paul
mathieu grelier wrote:
Ok, I've just tried to use zerodist before calling the autoKrige function but the error remains the same (memory_c...). Did you manage to perform the local kriging? You said there was still an error. I forward this message to the author of automap. I don't know if automap can handle this situation. Paul, please could you give us an answer about last question from edzer? Thanks Mathieu ---------- Forwarded message ---------- From: Edzer Pebesma <edzer.pebesma at uni-muenster.de> Date: 7 avr. 2008 12:42 Subject: Re: [R-sig-Geo] dimensions do not match To: mathieu grelier <greliermathieu at gmail.com>, r-sig-geo at stat.math.ethz.ch 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 (
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
Drs. Paul Hiemstra Department of Physical Geography Faculty of Geosciences University of Utrecht Heidelberglaan 2 P.O. Box 80.115 3508 TC Utrecht Phone: +31302535773 Fax: +31302531145 http://intamap.geo.uu.nl/~paul