

tpsreg(funfits)                              R Documentation

_T_h_i_n _p_l_a_t_e _s_p_l_i_n_e _r_e_g_r_e_s_s_i_o_n _~_f_u_n_c_t_i_o_n _t_o _d_o _?_?_?

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

     A thin plate spline is result of minimizing the resid-
     ual sum of squares subject to the constraint that the
     function have a certain level of smoothness (or rough-
     ness penalty). Here smoothness is quantified by the
     integral of squared m^th order derivatives. For one
     dimension and m=2 the roughness penalty is the inte-
     grated square of the second derivative of the function.
     For two dimensions the roughness penalty is the inte-
     gral of the square of Dxx(f) + 2Dxy(f) +Dyy(f) (where
     Duv denotes the second partial derivative with respect
     to u and v.) Besides controlling the order of the
     derivatives, the value of m also determines the base
     polynomial that will be fit to the data.  The degree of
     this polynomial will be (m-1).

     The smoothing parameter controls the amount that the
     data is smoothed. In the usual form this is denoted by
     lambda, the Lagrange multiplier of the minimization
     problem. Although this is an awkward scale, lambda =0
     corresponds to no smoothness constraints and the data
     is interpolated.  lambda=infinity corresponds to just
     fitting the polynomial base model by ordinary least
     squares.  GCVPACK and this function use a more conve-
     nient scale for the smoothing parameter which in terms
     of lambda is log10(n*lambda). Thus interpolation and
     smoothing correspond to the extremes -infinity and
     +infinity.  The preferred is the effective number of
     parameters associated with the fitted surface. This
     scale is a complicated but monotone transformation of
     the smoothing parameter and these values are reported
     in gcv.grid and the eff.df components.

_U_s_a_g_e_:

     tpsreg(x, y, spar, m=2, clean=T)

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

       x: A matrix of independent variables that are the
          arguments

       y: Vector of dependent variables

    spar: Value of the smoothing parameter.

       m: Order of spline surface.

   clean: Remove temporary files from the fitting process.

_V_a_l_u_e_:

     A list of class tpsreg. This includes the predicted
     surface in fitted.value and the residuals in residual.
     The results of the grid search to minimize the General-
     ized Cross Validation function is returned in gcv.grid.

_S_i_d_e _E_f_f_e_c_t_s_:

     The computations are done by writing the data and job
     parameters to temporary UNIX files and executing a
     stand alone FORTRAN program. This strategy is preferred
     due to the memory requirements and the complexity of
     the thin plate spline algorithms. The bulk of the com-
     putations are done by a set of subroutines for thin
     plate spline problems: GCVPACK.

_R_e_f_e_r_e_n_c_e_s_:

     See Additive Models by Hastie and Tibshriani.

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

     predict.tpsreg, plot.tpsreg, summary.tpsreg

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

     Fitting a surface to ozone measurements.
     tpsreg(ozone$x, ozone$y) -> hold
     plot(hold) # residual plots and a plot of the GCV function verses the
                # effective number of parameters

