surf.ls               package:spatial               R Documentation

_F_i_t_s _a _T_r_e_n_d _S_u_r_f_a_c_e _b_y _L_e_a_s_t-_s_q_u_a_r_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Fits a trend surface by least-squares.

_U_s_a_g_e:

     surf.ls(np, x, y, z)

_A_r_g_u_m_e_n_t_s:

      np: degree of polynomial surface 

       x: x coordinates or a data frame with columns `x', `y', `z' 

       y: y coordinates 

       z: z coordinates. Will supersede `x$z' 

_V_a_l_u_e:

     list with components 

    beta: the coefficients 

       x: 

       y: 

       z: and others for internal use only. 

_S_e_e _A_l_s_o:

     `trmat', `surf.gls'

_E_x_a_m_p_l_e_s:

     data(topo)
     topo.kr <- surf.ls(2, topo)
     trsurf <- trmat(topo.kr, 0, 6.5, 0, 6.5, 50)
     contour(trsurf)
     points(topo)

