matern                 package:geoR                 R Documentation

_C_o_m_p_u_t_e_r _V_a_l_u_e_s _o_f _t_h_e _M_a_t_e_r_n _C_o_r_r_e_l_a_t_i_o_n _F_u_n_c_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     This function computes values of the Matern correlation function
     for given distances and parameters.

_U_s_a_g_e:

     matern(u, phi, kappa)

_A_r_g_u_m_e_n_t_s:

       u: a vector, matrix or array with values of the distances
          between pairs of data locations.  

     phi: value of the range parameter phi.  

   kappa: value of the smoothness parameter kappa.  

_D_e_t_a_i_l_s:

     The Matern model is defined as:


 rho(u;phi,kappa) =(2^(kappa-1) Gamma(kappa))^(-1) (u/phi)^kappa K_kappa(u/phi)


     where phi  and kappa are parameters and  K_kappa(...) denotes the
     modified Bessel function of the third kind of order kappa. The
     family is valid for phi > 0 and kappa > 0.

_V_a_l_u_e:

     A vector matrix or array, according to the argument 'u', with the
     values of the Matern correlation function for the given distances.

_A_u_t_h_o_r(_s):

     Paulo J. Ribeiro Jr. paulojus@leg.ufpr.br, 
      Peter J. Diggle p.diggle@lancaster.ac.uk.

_S_e_e _A_l_s_o:

     'cov.spatial' for the correlation functions implemented in 'geoR',
     and 'besselK' for computation of the Bessel functions.

_E_x_a_m_p_l_e_s:

     #
     # Models with fixed range and varying smoothness parameter
     #
     curve(matern(x, phi= 0.25, kappa = 0.5),from = 0, to = 1,
           xlab = "distance", ylab = expression(rho(h)), lty = 2,
           main=expression(paste("varying  ", kappa, "  and fixed  ", phi)))
     curve(matern(x, phi= 0.25, kappa = 1),from = 0, to = 1, add = TRUE)
     curve(matern(x, phi= 0.25, kappa = 2),from = 0, to = 1, add = TRUE,
           lwd = 2, lty=2)
     curve(matern(x, phi= 0.25, kappa = 3),from = 0, to = 1, add = TRUE,
           lwd = 2)
     legend(0.6,1, c(expression(kappa == 0.5), expression(kappa == 1),
         expression(kappa == 2), expression(kappa == 3)),
         lty=c(2,1,2,1), lwd=c(1,1,2,2))
     #
     # Correlations with equivalent "practical range"
     # and varying smoothness parameter
     #
     curve(matern(x, phi = 0.25, kappa = 0.5),from = 0, to = 1,
           xlab = "distance", ylab = expression(gamma(h)), lty = 2,
           main = "models with equivalent \"practical\" range")
     curve(matern(x, phi = 0.188, kappa = 1),from = 0, to = 1, add = TRUE)      
     curve(matern(x, phi = 0.14, kappa = 2),from = 0, to = 1,
           add = TRUE, lwd=2, lty=2)      
     curve(matern(x, phi = 0.117, kappa = 2),from = 0, to = 1,
           add = TRUE, lwd=2)      
     legend(0.4,1, c(expression(paste(kappa == 0.5, "  and  ",
            phi == 0.250)),
            expression(paste(kappa == 1, "  and  ", phi == 0.188)),
            expression(paste(kappa == 2, "  and  ", phi == 0.140)),
            expression(paste(kappa == 3, "  and  ", phi == 0.117))),
            lty=c(2,1,2,1), lwd=c(1,1,2,2))

