Dear all,what is LDLfactor in kriging?I got at error message while I was using OK. the error statement is like this "Error in predict.gstat(g, newdata = newdata, block = block, nsim = nsim, :   LDLfactor "
I was using the following optional script for kriging to run: 1. <Dembia.OM.krg <- krige(OM_perc~1, loc=Dembia.utm, newdata=Dembia.grid, model=fit.OM_perc.gau)>2. <Dembia.OM.krg <- krige(OM_perc ~1, Dembia.utm, Dembia.grid, fit.OM_perc.gau)>3. <Dembia.OM.krg <- krige(OM_perc~1, newdata=Dembia.utm, block=Dembia.grid, model=fit.OM_perc.gau)>
all of the above give the same error, and kriging does not work.Can you give me some hint?Thanks

Hailu 
--- On Tue, 1/22/13, r-sig-geo-request@r-project.org <r-sig-geo-request@r-project.org> wrote:

From: r-sig-geo-request@r-project.org <r-sig-geo-request@r-project.org>
Subject: R-sig-Geo Digest, Vol 113, Issue 21
To: r-sig-geo@r-project.org
Date: Tuesday, January 22, 2013, 3:00 AM

Send R-sig-Geo mailing list submissions to
    r-sig-geo@r-project.org

To subscribe or unsubscribe via the World Wide Web, visit
    https://stat.ethz.ch/mailman/listinfo/r-sig-geo
or, via email, send a message with subject or body 'help' to
    r-sig-geo-request@r-project.org

You can reach the person managing the list at
    r-sig-geo-owner@r-project.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of R-sig-Geo digest..."


Today's Topics:

   1. Class nb (spdep) from class igraph (Paul Galpern)
   2. Re: How to show the color ramp legend with discrete data in
      spplot ? (Oscar Perpi?an)
   3. Kriging problem (Alemu Tadesse)
   4. Re: Kriging problem (Alemu Tadesse)
   5. Kriging (Alemu Tadesse)
   6. Re: Class nb (spdep) from class igraph (Roger Bivand)


----------------------------------------------------------------------

Message: 1
Date: Mon, 21 Jan 2013 13:41:37 -0600
From: Paul Galpern <pgalpern@gmail.com>
To: "r-sig-geo@r-project.org" <r-sig-geo@r-project.org>
Subject: [R-sig-Geo] Class nb (spdep) from class igraph
Message-ID: <50FD99F1.3040805@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Is there a simple way to produce an nb object (in spdep) from a weighted 
or unweighted undirected graph (in igraph).

Could the output of igraph::graph.adjacency(x) be converted to class nb?

Alternatively, igraph::graph.edgelist(x) could be manipulated into class 
Graph, and then spdep::graph2nb() used.

Am I missing an obvious way to do this?

Thanks,
Paul

-- 
Paul Galpern
Natural Resources Institute
70 Dysart Road
University of Manitoba
Winnipeg, Manitoba, Canada R3T 2M6
http://borealscape.ca



------------------------------

Message: 2
Date: Mon, 21 Jan 2013 22:26:41 +0100
From: Oscar Perpi?an <oscar.perpinan@gmail.com>
To: Edzer Pebesma <edzer.pebesma@uni-muenster.de>
Cc: r-sig-geo@r-project.org
Subject: Re: [R-sig-Geo] How to show the color ramp legend with
    discrete data in spplot ?
Message-ID:
    <CAMLL7b=_9m7MV-Pj1ZgQJ-KT-uDhXXaBgXAc6Bxuz2mgQGzkuw@mail.gmail.com>
Content-Type: text/plain

Hello,

> I'll see how I can integrate this with spplot.
> Edzer Pebesma

Perhaps the approach of the figure 5.6 of the "Lattice" book can be more
easily integrated in the spplot method:
http://lmdvr.r-forge.r-project.org/figures/figures.html?chapter=05;figure=05_06;theme=stdBW;code=right
It uses xyplot and displays the legend with draw.key.

Best,

Oscar.

    [[alternative HTML version deleted]]



------------------------------

Message: 3
Date: Mon, 21 Jan 2013 16:46:20 -0700
From: Alemu Tadesse <alemu.tadesse@gmail.com>
To: R-SIG list <r-sig-geo@r-project.org>
Subject: [R-sig-Geo] Kriging problem
Message-ID:
    <CACGkHRM+pLSz3SdBh715ktRMueLm0ohr-4kPS94TeXTT1wP7FQ@mail.gmail.com>
Content-Type: text/plain

Dear All,

I was trying to understand the spatial variability of a variable over a
region (variogram and kriging). I have attache the file for you to have a
look if ONLY you have a time. I am not familiar how R is computing
variogram and ultimately kriging. I read couple of papers and I had
difficulty to understand them. I really appreciate your help. For most of
you this might be a very trivial problem.

Thank you in Advance for your time and help.

Best,
Alemu

    [[alternative HTML version deleted]]



------------------------------

Message: 4
Date: Mon, 21 Jan 2013 23:12:05 -0700
From: Alemu Tadesse <alemu.tadesse@gmail.com>
To: R-SIG list <r-sig-geo@r-project.org>
Subject: Re: [R-sig-Geo] Kriging problem
Message-ID:
    <CACGkHRN76V2zK+4vF7-LF0ppcfoZ4yNDXr+07jy=Uu8uj9w33g@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

>  Dear All,
>
>>
>>
>> I was trying to understand the spatial variability of a variable over a
>> region (variogram and kriging). I have attache the file for you to have a
>> look if ONLY you have a time. I am not familiar how R is computing
>> variogram and ultimately kriging. I read couple of papers and I had
>> difficulty to understand them. I really appreciate your help. For most of
>> you this might be a very trivial problem.
>>
>> Thank you in Advance for your time and help.
>>
>> Best,
>> Alemu
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20130121/3af46356/attachment-0001.html>
-------------- next part --------------
stn_id,id1,id2,id3,id8,id7,id65,,,
lat,40.658519,40.637669,40.604976,40.697424,40.686422,40.643817,,,
lon,-74.226656,-74.263492,-74.289558,-74.276542,-74.310531,-74.22905,,,
2012,1,5,1,-0.073466667,-0.073466667,-0.076,-0.054466667,-0.063333333,-0.077283333
2012,1,5,2,-0.073466667,-0.074733333,-0.076,-0.048133333,-0.073466667,-0.076
2012,1,5,3,-0.073466667,-0.070933333,-0.076,-0.038,-0.0646,-0.077283333
2012,1,5,4,-0.073466667,-0.07475,-0.076,-0.048133333,-0.065866667,-0.077283333
2012,1,5,5,-0.070933333,-0.076,-0.076,-0.043066667,-0.076,-0.076
2012,1,5,6,-0.0722,-0.0722,-0.076,-0.039266667,-0.072135593,-0.076
2012,1,5,7,-0.0608,-0.039216667,-0.0722,-0.040533333,-0.067133333,-0.07985
2012,1,5,8,3.50575,9.45795,2.8979,3.320066667,3.400166667,2.89915
2012,1,5,9,39.24308333,29.74076667,34.85105,29.4584,27.5523,33.7449
2012,1,5,10,62.36396667,165.7473667,54.6011,53.50116667,53.224,53.9831
2012,1,5,11,274.53615,418.1773333,163.9925167,287.028,270.8855,203.9171833
2012,1,5,12,692.5392,495.0155167,528.1320667,578.0880833,558.67645,551.7641833
2012,1,5,13,671.98945,511.5267667,557.3705167,562.1986333,547.3289,571.6336
2012,1,5,14,240.3272333,409.9439,277.0628333,176.3801,161.4838167,232.2921833
2012,1,5,15,180.5622667,310.8444167,144.37865,171.7453,138.30065,199.7439333
2012,1,5,16,173.6552,219.1213333,82.99003333,165.60495,116.5084833,162.4196167
2012,1,5,17,16.9067,15.93268333,19.17143333,31.40643333,13.12256667,22.6466
2012,1,5,18,0.000116667,-0.041783333,-0.049333333,0.008983333,-0.037916667,-0.0557
2012,1,5,19,-0.057,-0.067133333,-0.076,-0.036733333,-0.0684,-0.077283333
2012,1,5,20,-0.063333333,-0.065866667,-0.076,-0.038,-0.0684,-0.076
2012,1,5,21,-0.069666667,-0.0684,-0.076,-0.050666667,-0.069666667,-0.084983333
2012,1,5,22,-0.0722,-0.0722,-0.076,-0.044333333,-0.073466667,-0.082416667
2012,1,5,23,-0.0684,-0.063333333,-0.076,-0.044333333,-0.073466667,-0.0837
2012,1,6,0,-0.073466667,-0.0722,-0.076,-0.051933333,-0.074733333,-0.077283333
2012,1,6,1,-0.069666667,-0.069666667,-0.076,-0.058266667,-0.0722,-0.077283333
2012,1,6,2,-0.069666667,-0.068383333,-0.076,-0.0494,-0.0722,-0.076
2012,1,6,3,-0.0684,-0.074733333,-0.076,-0.043066667,-0.067133333,-0.077283333
2012,1,6,4,-0.065866667,-0.070933333,-0.076,-0.0418,-0.0684,-0.077283333
2012,1,6,5,-0.069666667,-0.070933333,-0.076,-0.044333333,-0.076,-0.076
2012,1,6,6,-0.073466667,-0.070933333,-0.076,-0.0532,-0.068271186,-0.078566667
2012,1,6,7,-0.04045,-0.058266667,-0.058233333,-0.029066667,-0.041716667,-0.073583333
2012,1,6,8,20.10728333,9.602883333,16.88131667,16.94738333,17.78286667,15.66575
2012,1,6,9,153.5403167,29.46091667,84.1853,113.2278667,112.09875,110.6657167
2012,1,6,10,472.4655,171.3626,249.1353333,383.72045,354.2734667,323.9733333
2012,1,6,11,394.8135667,431.9991667,289.0584237,264.0037333,226.0360833,322.0456333
2012,1,6,12,376.6912,445.3010667,399.32505,232.17015,224.67675,319.3384833
2012,1,6,13,475.3761667,395.30565,446.7671667,381.4303167,443.60735,423.0613167
2012,1,6,14,470.2860667,464.92645,439.6095167,373.1142167,370.4732667,436.3632167
2012,1,6,15,200.4229,208.09555,200.8997333,166.51545,164.1425833,184.9695833
2012,1,6,16,82.33896667,190.6382333,69.17321667,66.99255,65.7552,70.74231667
2012,1,6,17,19.79705,30.03441667,19.36981667,19.90133333,17.47266667,26.09636667
2012,1,6,18,0.115766667,-0.036683333,0.076516667,0.115783333,0.076433333,0.08285
2012,1,6,19,-0.0266,-0.0722,-0.076,-0.0342,-0.062066667,-0.07985
2012,1,6,20,-0.037983333,-0.0684,-0.076,-0.027866667,-0.055733333,-0.076
2012,1,6,21,-0.048133333,-0.073466667,-0.076,-0.032933333,-0.059533333,-0.076
2012,1,6,22,-0.046866667,-0.073466667,-0.076,-0.0342,-0.069666667,-0.07985
2012,1,6,23,-0.0494,-0.074733333,-0.076,-0.035466667,-0.069666667,-0.081133333

------------------------------

Message: 5
Date: Mon, 21 Jan 2013 23:25:21 -0700
From: Alemu Tadesse <alemu.tadesse@gmail.com>
To: R-SIG list <r-sig-geo@r-project.org>
Subject: [R-sig-Geo] Kriging
Message-ID:
    <CACGkHRM37VA6oireWHf7dPTb5U3LQd0f7kD1PR0Gp19xrACKGA@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Dear All,

I was trying to understand the spatial variability of a variable over a
region (variogram and kriging). I have attache the file for you to have a
look if ONLY you have a time. I am not familiar how R is computing
variogram and ultimately kriging. I read couple of papers and I had
difficulty to understand them. I really appreciate your help. For most of
you this might be a very trivial problem.

Thank you in Advance for your time and help.

Best,
Alemu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20130121/12f9f249/attachment-0001.html>
-------------- next part --------------
stn_id,id1,id2,id3,id8,id7,id65,,,
lat,40.658519,40.637669,40.604976,40.697424,40.686422,40.643817,,,
lon,-74.226656,-74.263492,-74.289558,-74.276542,-74.310531,-74.22905,,,
2012,1,5,1,-0.073466667,-0.073466667,-0.076,-0.054466667,-0.063333333,-0.077283333
2012,1,5,2,-0.073466667,-0.074733333,-0.076,-0.048133333,-0.073466667,-0.076
2012,1,5,3,-0.073466667,-0.070933333,-0.076,-0.038,-0.0646,-0.077283333
2012,1,5,4,-0.073466667,-0.07475,-0.076,-0.048133333,-0.065866667,-0.077283333
2012,1,5,5,-0.070933333,-0.076,-0.076,-0.043066667,-0.076,-0.076
2012,1,5,6,-0.0722,-0.0722,-0.076,-0.039266667,-0.072135593,-0.076
2012,1,5,7,-0.0608,-0.039216667,-0.0722,-0.040533333,-0.067133333,-0.07985
2012,1,5,8,3.50575,9.45795,2.8979,3.320066667,3.400166667,2.89915
2012,1,5,9,39.24308333,29.74076667,34.85105,29.4584,27.5523,33.7449
2012,1,5,10,62.36396667,165.7473667,54.6011,53.50116667,53.224,53.9831
2012,1,5,11,274.53615,418.1773333,163.9925167,287.028,270.8855,203.9171833
2012,1,5,12,692.5392,495.0155167,528.1320667,578.0880833,558.67645,551.7641833
2012,1,5,13,671.98945,511.5267667,557.3705167,562.1986333,547.3289,571.6336
2012,1,5,14,240.3272333,409.9439,277.0628333,176.3801,161.4838167,232.2921833
2012,1,5,15,180.5622667,310.8444167,144.37865,171.7453,138.30065,199.7439333
2012,1,5,16,173.6552,219.1213333,82.99003333,165.60495,116.5084833,162.4196167
2012,1,5,17,16.9067,15.93268333,19.17143333,31.40643333,13.12256667,22.6466
2012,1,5,18,0.000116667,-0.041783333,-0.049333333,0.008983333,-0.037916667,-0.0557
2012,1,5,19,-0.057,-0.067133333,-0.076,-0.036733333,-0.0684,-0.077283333
2012,1,5,20,-0.063333333,-0.065866667,-0.076,-0.038,-0.0684,-0.076
2012,1,5,21,-0.069666667,-0.0684,-0.076,-0.050666667,-0.069666667,-0.084983333
2012,1,5,22,-0.0722,-0.0722,-0.076,-0.044333333,-0.073466667,-0.082416667
2012,1,5,23,-0.0684,-0.063333333,-0.076,-0.044333333,-0.073466667,-0.0837
2012,1,6,0,-0.073466667,-0.0722,-0.076,-0.051933333,-0.074733333,-0.077283333
2012,1,6,1,-0.069666667,-0.069666667,-0.076,-0.058266667,-0.0722,-0.077283333
2012,1,6,2,-0.069666667,-0.068383333,-0.076,-0.0494,-0.0722,-0.076
2012,1,6,3,-0.0684,-0.074733333,-0.076,-0.043066667,-0.067133333,-0.077283333
2012,1,6,4,-0.065866667,-0.070933333,-0.076,-0.0418,-0.0684,-0.077283333
2012,1,6,5,-0.069666667,-0.070933333,-0.076,-0.044333333,-0.076,-0.076
2012,1,6,6,-0.073466667,-0.070933333,-0.076,-0.0532,-0.068271186,-0.078566667
2012,1,6,7,-0.04045,-0.058266667,-0.058233333,-0.029066667,-0.041716667,-0.073583333
2012,1,6,8,20.10728333,9.602883333,16.88131667,16.94738333,17.78286667,15.66575
2012,1,6,9,153.5403167,29.46091667,84.1853,113.2278667,112.09875,110.6657167
2012,1,6,10,472.4655,171.3626,249.1353333,383.72045,354.2734667,323.9733333
2012,1,6,11,394.8135667,431.9991667,289.0584237,264.0037333,226.0360833,322.0456333
2012,1,6,12,376.6912,445.3010667,399.32505,232.17015,224.67675,319.3384833
2012,1,6,13,475.3761667,395.30565,446.7671667,381.4303167,443.60735,423.0613167
2012,1,6,14,470.2860667,464.92645,439.6095167,373.1142167,370.4732667,436.3632167
2012,1,6,15,200.4229,208.09555,200.8997333,166.51545,164.1425833,184.9695833
2012,1,6,16,82.33896667,190.6382333,69.17321667,66.99255,65.7552,70.74231667
2012,1,6,17,19.79705,30.03441667,19.36981667,19.90133333,17.47266667,26.09636667
2012,1,6,18,0.115766667,-0.036683333,0.076516667,0.115783333,0.076433333,0.08285
2012,1,6,19,-0.0266,-0.0722,-0.076,-0.0342,-0.062066667,-0.07985
2012,1,6,20,-0.037983333,-0.0684,-0.076,-0.027866667,-0.055733333,-0.076
2012,1,6,21,-0.048133333,-0.073466667,-0.076,-0.032933333,-0.059533333,-0.076
2012,1,6,22,-0.046866667,-0.073466667,-0.076,-0.0342,-0.069666667,-0.07985
2012,1,6,23,-0.0494,-0.074733333,-0.076,-0.035466667,-0.069666667,-0.081133333

------------------------------

Message: 6
Date: Tue, 22 Jan 2013 08:44:45 +0100
From: Roger Bivand <Roger.Bivand@nhh.no>
To: Paul Galpern <pgalpern@gmail.com>
Cc: "r-sig-geo@r-project.org" <r-sig-geo@r-project.org>
Subject: Re: [R-sig-Geo] Class nb (spdep) from class igraph
Message-ID: <alpine.LRH.2.02.1301220827370.23461@reclus.nhh.no>
Content-Type: text/plain; charset="US-ASCII"; format=flowed

On Mon, 21 Jan 2013, Paul Galpern wrote:

> Is there a simple way to produce an nb object (in spdep) from a weighted or 
> unweighted undirected graph (in igraph).

No, unless you can make them back into a (possibly sparse) adjacency 
matrix. The igraph S3 class (returned by graph.adjacency) is fish soup, 
while the input adjacency matrix would work directly with 
spdep::mat2listw().

Please provide sample code to illustrate your question - preferably 
showing how to go from and to nb objects. If you add igraph <-> graphNEL 
<-> sparse matrix, you can get there, but not igraph <-> nb in one hop, 
going through graphNEL is needed:

library(igraph)
set.seed(1)
adjm <- matrix(sample(0:1, 100, replace=TRUE, prob=c(0.8,0.2)), nc=10)
g1 <- graph.adjacency(adjm)
library(graph)
g1G <- igraph.to.graphNEL(g1)
library(Matrix)
sM <- as(g1G, "sparseMatrix")
library(spdep)
nb <- mat2listw(sM)$neighbours
nb
sum(adjm)

If you wanted to contribute a function, the igraph.[to|from].graphNEL code
would probably show how it could be done, because graphNEL are quite 
similar to listw objects.

Hope this helps,

Roger

>
> Could the output of igraph::graph.adjacency(x) be converted to class nb?
>
> Alternatively, igraph::graph.edgelist(x) could be manipulated into class
> Graph, and then spdep::graph2nb() used.
>
> Am I missing an obvious way to do this?
>
> Thanks,
> Paul
>
>

-- 
Roger Bivand
Department of Economics, NHH Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand@nhh.no



------------------------------

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


End of R-sig-Geo Digest, Vol 113, Issue 21
******************************************

	[[alternative HTML version deleted]]

