Hi All
 
please help me figure out this problems: give kappa = 1,1.5,2,2.5,3 , phi= say 1, nugget= 0.1 and sigma (squared)= 1.0 how do i calculate the matern? I have tried to come up with a code.
but i have manage to draw some curves without using some parameters but not sigma and nugget and i wonder whether they are to be used.........:
 
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)
> 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=2,lty=1)
> 
> legend("topright", expression(kappa==1.0, kappa==1.5, kappa==2.0, kappa==2.5, kappa==3.0),
+        lry= c(2,1,2,1,2),lwd=c(1,1,2,2,2))
Error in legend("topright", expression(kappa == 1, kappa == 1.5, kappa ==  : 
  unused argument(s) (lry = c(2, 1, 2, 1, 2))
> legend("topright", expression(kappa==1.0, kappa==1.5, kappa==2.0, kappa==2.5, kappa==3.0),
+        lty= c(2,1,2,1,2),lwd=c(1,1,2,2,2))
> legend("topright", expression(kappa==1.0, kappa==1.5, kappa==2.0, kappa==2.5, kappa==3.0),
+        lty= c(2,1,2,1,2),lwd=c(1,1,2,2,1))
> legend("topright", expression(kappa==1.0, kappa==1.5, kappa==2.0, kappa==2.5, kappa==3.0),
+        lty= c(2,1,2,1,1),lwd=c(1,1,2,2,2))


      
	[[alternative HTML version deleted]]

