gpls                  package:gpls                  R Documentation

_A _f_u_n_c_t_i_o_n _t_o _f_i_t _G_e_n_e_r_a_l_i_z_e_d _p_a_r_t_i_a_l _l_e_a_s_t _s_q_u_a_r_e_s _m_o_d_e_l_s.

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

     Partial least squares is a commonly used dimension reduction
     technique. The paradigm can be extended to include generalized
     linear models in several different ways. The code in this function
     uses the extension proposed by Ding and Gentleman, 2004.

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

     gpls(x, ...)

     ## Default S3 method:
     gpls(x, y, K.prov=NULL, eps=1e-3, lmax=100, b.ini=NULL,
         denom.eps=1e-20, family="binomial", link=NULL, br=TRUE, ...)

     ## S3 method for class 'formula':
     gpls(formula, data, contrasts=NULL, K.prov=NULL,
     eps=1e-3, lmax=100, b.ini=NULL, denom.eps=1e-20, family="binomial",
     link=NULL, br=TRUE, ...)

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

       x: The matrix of covariates.

 formula: A formula of the form 'y ~ x1 + x2 + ...', where 'y' is the
          response and the other terms are covariates.

       y: The vector of responses

    data: A data.frame to resolve the forumla, if used

  K.prov: number of PLS components, default is the rank of X

     eps: tolerance for convergence

    lmax: maximum number of iteration allowed 

   b.ini: initial value of regression coefficients

denom.eps: small quanitity to guarantee nonzero denominator in deciding
          convergence

  family: glm family, 'binomial' is the only relevant one here 

    link: link function, 'logit' is the only one practically
          implemented now

      br: TRUE if Firth's bias reduction procedure is used

     ...: Additional arguements. 

contrasts: an optional list. See the 'contrasts.arg' of
          'model.matrix.default'.

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

     This is a different interface to the functionality provided by
     'glpls1a'. The interface is intended to be simpler to use and more
     consistent with other matchine learning code in R.

     The technology is intended to deal with two class problems where
     there are more predictors than cases. If a response variable ('y')
     is used that has more than two levels the behavior may be unusual.

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

     An object of class 'gpls' with the following components: 

coefficients: The estimated coefficients.

convergence: A boolean indicating whether convergence was achieved.

   niter: The total number of iterations.

bias.reduction: A boolean indicating whether Firth's procedure was
          used.

  family: The 'family' argument that was passed in.

    link: The 'link' argument that was passed in.

    call: The call

    levs: The factor levels for prediction.

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

     B. Ding and R. Gentleman

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

_D_i_n_g, _B._Y. _a_n_d _G_e_n_t_l_e_m_a_n, _R. (_2_0_0_3) Classification using generalized
     partial least squares.

_M_a_r_x, _B._D (_1_9_9_6) Iteratively reweighted partial least squares
     estimation for generalized linear regression. Technometrics 38(4):
     374-381.

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

     'glpls1a'

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

     library(MASS)
     m1 = gpls(type~., data=Pima.tr, K=3)

