

addreg(funfits)                              R Documentation

_A_d_d_i_t_i_v_e _n_o_n_p_a_r_a_m_e_t_r_i_c _r_e_g_r_e_s_s_i_o_n

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

     Estimates the univariate functions using backfitting.
     If lambda is omitted in the call then at each step the
     smoothing parameter is estimated by minimizing the GCV
     criterion: GCV(lambda)=(1/n)* RSS/(n- p*2 + cost*(sum(
     J_i))**2

     Here J_i = tr(A_i) -2 where  A_i is the smoothing
     matrix for variable i.

     If p=1 and cost =1 this is the usual GCV function. A
     cost > 1 has the effect of being more conservative in
     choosing estimates that deviate from a linear function.
     Note that the effective number of parameters in the
     total model can be approximated by sum( tr( A_i)).

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

     addreg(x, y, lam, nback=20, tol=1e-05, start, cost=1)

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

       x: Matrix of independent variables

       y: Vector of independent variables

     lam: Vector of length P with values of the smoothing
          parameters. If missing then the parameters are
          found by generalized cross-validation.

   nback: Maximum number of iterations for backfitting.

     tol: Tolerance value for judging convergence of back-
          fitting.

   start: Matrix of starting values for the function esti-
          mates

    cost: Cost for each degree of freedom in the GCV crite-
          rion.

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

     A list of class addreg. Components fitted.values and
     residuals contain the results of the fit. pre-
     dicted.comp is matrix whose columns contain the esti-
     mates for the individual functions. The component trace
     has the effective number of parameters associated with
     each smoother and lambda has the corresponding smooth-
     ing parameters. Convergence information is in the com-
     ponent converge.

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

     plot.addreg, gam, predict.addreg

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

     # Additive model fit to the minitriathon data. A prediction of
     # run times based on the swim and bike performance.
     # The smoothing parameters found by GCV with cost=2.
     cbind( minitri$swim, minitri$bike)-> x
     addreg( x,minitri$run,cost=2)-> out
     plot( out) # summary plots of fits
     list( c(10,25), c(35,55))-> grid.list
     predict.surface(out, grid.list)-> out.p
     persp( out.p) # perspective plot of fitted surface

