<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi everyone,<br>
<br>
for a spatial prediction I want to use a simple linear regression
where spatial coordinates are used for predictors (trend surface
analysis) which can easily be done by <br>
<br>
DAT <-
as.data.frame(cbind(x=Grid@coords[,1],y=Grid@coords[,2],z=Grid@data$z))<br>
#I attached DAT<br>
<br>
dg <- 4<br>
M1 <- surf.ls(np=dg,DAT)<br>
<br>
I would like to get the derivation of the function, so I tried <br>
<br>
PD <- predict.derivative(M1,DAT$x,DAT$y)<br>
<br>
I would have expected to obtain a matrix of partial derivatives: The
columns being the partial derivatives and the rows the locations as
it is explained in the manual. Instead, I get a vector. What is
that?<br>
<br>
Furthermore, is there a convenient way of getting the explicit
equation of the model<span style="color: rgb(0, 0, 0); font-family:
'Droid Sans'; font-size: 13px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
16px; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(253, 253,
252); display: inline !important; float: none; "></span> function,
instead of taking the coefficients manually out of the model output?<br>
I have also tried to use lm for modelling the surface<br>
M2 <- lm(z ~ poly(x,y, degree= dg,raw=FALSE), data=DAT)<br>
but also here I can not find an easy way to derive the derivation of
the model function.<br>
<br>
Any suggestion would be helpful.<br>
Thanks in advance,<br>
Claudia<br>
</body>
</html>