

bruto(mda)                                   R Documentation

_F_i_t _a_n _a_d_d_i_t_i_v_e _s_p_l_i_n_e _m_o_d_e_l _b_y _a_d_a_p_t_i_v_e _b_a_c_k_f_i_t_t_i_n_g

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

     bruto(x, y, w, wp, dfmax, cost, maxit.select, maxit.backfit,
             thresh=0.0001, trace=T, start.linear=T, fit.object, ...)

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

       x: a matrix of numeric predictors (does not include
          the column of 1s)

       y: a vector or matrix of responses

       w: optional observation weight vector

      wp: optional weight vector for each column of y; the
          RSS and GCV criteria use a weighted sum of squared
          residuals.

   dfmax: a vector of maximum df (degrees of freedom) for
          each term

    cost: cost per degree of freedom; default is 2.

maxit.select: maximum number of iterations during the selec-
          tion stage

maxit.backfit: maximum number of iterations for the final
          backfit stage (with fixed lambda)

  thresh: convergence threshold (default is 0.0001); itera-
          tions cease when the relative change in GCV is
          below this threshold

   trace: logical flag. If `TRUE' (default) a progress
          report is printed during the fitting.

start.linear: logical flag.  If `TRUE', the model starts
          with the linear fit.

fit.object: This the object returned by `bruto()'; if sup-
          plied, the same model is fit to the presumeably
          new y.

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

     A multiresponse additive model fit object of class
     `bruto' is returned.  The model is fit by adaptive
     backfitting using smoothing splines.  If there are `np'
     columns in `y', then `np' additive models are fit, but
     the same amount of smoothing (df) is used for the jth
     term of each. The procedure chooses between `df = 0'
     (term omitted), `df = 1' (term linear) or `df > 0'
     (term fitted by smoothing spline).  The model selection
     is based on an approximation to the  GCV criterion,
     which is used at each step of the backfitting proce-
     dure. Once the selection process stops, the model is
     backfit using the chosen amount of smoothing.

     A bruto object has the following components of inter-
     est:

  lambda: a vector of chosen smoothing parameters, one for
          each column of x

      df: the df chosen for each column of x

    type: a factor with levels `excluded', `linear' or
          `smooth', indicating the status of each column of
          x.

gcv.select:

gcv.backfit:

df.select: The sequence of gcv values and df selected during
          the execution of the function.

     nit: The number of iterations used

fitted.values: a matrix of fitted values

residuals: a matrix of residuals

    call: the call that produced this object

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

     Trevor Hastie and Rob Tibshirani, Generalized Additive
     Models, Chapman and Hall, 1990 (page 262).

     Trevor Hastie, Rob Tibshirani and Andreas Buja ``Flexi-
     ble Discriminant Analysis by Optimal Scoring'' AT\&T
     Bell Laboratories Technical Memorandum, February 1993.

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

     `predict.bruto'

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

     data(trees)
     fit1 <- bruto(trees[,-3], trees[3])
     fit1$type
     fit1$df
     # examine the fitted functions
     par(mfrow=c(1,2), pty="s")
     Xp <- matrix(sapply(trees[1:2], mean), nrow(trees), 2, byrow=T)
     for(i in 1:2) {
       xr <- sapply(trees, range)
       Xp1 <- Xp; Xp1[,i] <- seq(xr[1,i], xr[2,i], len=nrow(trees))
       Xf <- predict(fit1, Xp1)
       plot(Xp1[ ,i], Xf, xlab=names(trees)[i], ylab="", type="l")
     }

