<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16640" name=GENERATOR><!--[if !mso]>
<STYLE>v\:* {
        BEHAVIOR: url(#default#VML)
}
o\:* {
        BEHAVIOR: url(#default#VML)
}
w\:* {
        BEHAVIOR: url(#default#VML)
}
.shape {
        BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]-->
<STYLE>@page Section1 {size: 612.0pt 792.0pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
</STYLE>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=144094408-29082008>Dear Nicola,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=144094408-29082008></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=144094408-29082008>I think that since the covars&nbsp;contains the
locations of the predpoints you don't need two dataframes. Futhermore make sure
that the names of the covars are identical (including
capitalisation).</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=144094408-29082008></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT><SPAN
class=144094408-29082008>mlx2&lt;-likfit(nicola, cov.model="mat", kap=0.5,
ini=c(0.6, 20), nug=0.3, trend=~OTUBOIDIST&nbsp;+ LSTPHAN)
<BR>kcontrol&lt;-krige.control(obj.m=mlx2, type.krige="ok", trend.d=~OTUBOIDIST
+ LSTPHAN, trend.l=~OTUBOIDIST + LSTPHAN) <BR>krige&lt;-krige.conv(nicola,
loc=covars, krige=kcontrol)</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=144094408-29082008><FONT face=Arial color=#0000ff size=2>Does
that work?</FONT></SPAN></DIV>
<DIV><SPAN class=144094408-29082008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=144094408-29082008><FONT face=Arial color=#0000ff
size=2>HTH,</FONT></SPAN></DIV>
<DIV><SPAN class=144094408-29082008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=144094408-29082008><FONT face=Arial color=#0000ff
size=2>Thierry</FONT></SPAN></DIV>
<DIV><FONT
size=2>----------------------------------------------------------------------------<BR>ir.
Thierry Onkelinx<BR>Instituut voor natuur- en bosonderzoek / Research Institute
for Nature and Forest<BR>Cel biometrie, methodologie en kwaliteitszorg / Section
biometrics, methodology and quality assurance<BR>Gaverstraat 4<BR>9500
Geraardsbergen<BR>Belgium<BR>tel. + 32 54/436
185<BR>Thierry.Onkelinx@inbo.be<BR>www.inbo.be<BR><BR>To call in the
statistician after the experiment is done may be no more than asking him to
perform a post-mortem examination: he may be able to say what the experiment
died of.<BR>~ Sir Ronald Aylmer Fisher<BR><BR>The plural of anecdote is not
data.<BR>~ Roger Brinner<BR><BR>The combination of some data and an aching
desire for an answer does not ensure that a reasonable answer can be extracted
from a given body of data.<BR>~ John Tukey<BR></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV><FONT face=Arial
color=#0000ff size=2></FONT><BR>
<DIV class=OutlookMessageHeader lang=nl dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Van:</B> r-sig-geo-bounces@stat.math.ethz.ch
[mailto:r-sig-geo-bounces@stat.math.ethz.ch] <B>Namens </B>Nicola
Batchelor<BR><B>Verzonden:</B> vrijdag 29 augustus 2008 10:19<BR><B>Aan:</B>
r-sig-geo@stat.math.ethz.ch<BR><B>Onderwerp:</B> [R-sig-Geo] Prediction
locations for kriging in geoR<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN lang=EN-GB
style="FONT-SIZE: 12pt">Hi, <BR><BR>Im using geoR and I'm trying to do some
predictions, based on an external trend, using ordinary
kriging.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN lang=EN-GB
style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN lang=EN-GB
style="FONT-SIZE: 12pt">However, I seem to be getting some strange results from
my kriging, which I think must have something to do with a problem with my
prediction points. <BR><BR>I have my geodata object (called nicola), my
prediction points (predpoints, imported from a csv containing only the x and y
coordinated of the prediction locations) and my covariate data at each of the
prediction points (covars, imported from a csv containing the x and y
coordinates of the prediction locations, plus the values of the two covariates I
want to use at each of the prediction locations).
<BR><BR>&gt;predpoints&lt;-read.csv(file="C:\\Documents and
Settings\\s9901315\\My <BR>+ Documents\\Uni\\Data\\Work\\Case control
study\\Full study area\\R\\Files for analysis\\Prediction <BR>+
points\\predpoints.csv", header=FALSE, sep=",")
<BR><BR>&gt;covars&lt;-read.csv(file="C:\\Documents and Settings\\s9901315\\My
<BR>+ Documents\\Uni\\Data\\Work\\Case control study\\Full study area\\R\\Files
for analysis\\Covariate <BR>+ data\\covars.csv", header=TRUE, sep=",")
<BR><BR>The final model is defined using "OTUBOIDIST" and "LSTPHAN" as external
covariates: <BR><BR>&gt;mlx2&lt;-likfit(nicola, cov.model="mat", kap=0.5,
ini=c(0.6, 20), nug=0.3, trend=~OTUBOIDIST + <BR>+ LSTPHAN) <BR><BR>and then I
carry out the kriging using the model "mlx2", prediction points "predpoints",
and covariate data "covars" : <BR><BR>&gt;kcontrol&lt;-krige.control(obj.m=mlx2,
type.krige="ok", trend.d=~OTUBOIDIST + LSTPHAN, <BR>+ trend.l=~covars$otuboidist
+ covars$lstphan) <BR><BR>&gt;krige&lt;-krige.conv(nicola, loc=predpoints,
krige=kcontrol) <BR><BR>Then I view it using the image function:
<BR><BR>&gt;image(krige, col=gray(seq(1, 0.2, l=100))) <BR><BR>The resulting
image is clearly wrong with a regular stepped line appearing diagonally across
the image, and the predicted values do not coincide with the actual observed
data at all. &nbsp;I've included the predicted data image, as well as the
predicted image overlaid with the data points.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN lang=EN-GB
style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN lang=EN-GB
style="FONT-SIZE: 12pt">Can anyone give me any pointers of why this may be going
wrong? &nbsp;I've tried the same thing many times having changed everything I
can think of that might be causing the problem. <BR><BR>Thanks in advance,
<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN lang=EN-GB
style="FONT-SIZE: 12pt">Nicola<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN lang=EN-GB
style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN lang=EN-GB
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><IMG id=_x0000_i1025 height=429
src="cid:144094408@29082008-1AA9" width=483><IMG id=_x0000_i1031 height=433
src="cid:144094408@29082008-1AB0"
width=477><o:p></o:p></SPAN></FONT></P></DIV></BODY></HTML>

<table><tr><td bgcolor=#ffffff><font color=#000000>Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is door een geldig ondertekend document.<br>
The views expressed in  this message and any annex are purely those of the writer and may not be regarded as stating an official position of INBO, as long as the message is not confirmed by a duly signed document<br>
</font></td></tr></table>