[R-sig-Geo] Matern

TANKISO THEJANE tankisothejane at yahoo.com
Wed Aug 26 02:14:30 CEST 2009



Dear R users
 
Greetings from a novice. I would be grateful if you can help me complete the plot of a matern correlation function Matern Correlation function with   kappa =1,1.5,2,2.5,3 , phi = 1  The problem is that i can manage to get the result when t> 0 using the following code:
 
curve(matern(x, phi= 1.0, kappa = 1.0),from = 0, to = 1.5,
+    xlab = "distance", ylab = expression(rho(h)), lty = 2,
+    main=expression(paste("Matern Correlation with varying  ", kappa,
+    "  and fixed  ", phi)))
> curve(matern(x, phi= 1.0, kappa = 1.5),from = 0, to = 1.5, add = TRUE)
> curve(matern(x, phi= 1.0, kappa = 2.0),from = 0, to = 1.5, add = TRUE,lwd=2,lty=2)
> curve(matern(x, phi= 1.0, kappa = 2.5),from = 0, to = 1.5, add = TRUE,lwd=2)
> curve(matern(x, phi= 1.0, kappa = 3.0),from = 0, to = 1.5, add = TRUE,lwd=3)
> legend("topright", expression(kappa==1, kappa==1.5, kappa==2, kappa==2.5, kappa==3)
+       ,lty= c(2,1,2,1,1),lwd=c(1,1,2,2,3))
> 
> curve(matern(x, phi= 1.0, kappa = 1.0),from = 0, to = 1.5,
+    xlab = "distance", ylab = expression(rho(h)), lty = 2,
+    main=expression(paste("Matern Correlation with varying  ", kappa,
+    "  and fixed  ", phi)))
 
now i need to also add ot a plot the curve at t=0 matern = 0.1+1=1.1.
 
Tankiso


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20090825/e5e52273/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Matern.doc
Type: application/octet-stream
Size: 28672 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20090825/e5e52273/attachment.obj>


More information about the R-sig-Geo mailing list