Hkda, Hkda.diag              package:ks              R Documentation

_B_a_n_d_w_i_d_t_h _m_a_t_r_i_x _s_e_l_e_c_t_o_r_s _f_o_r _k_e_r_n_e_l _d_i_s_c_r_i_m_i_n_a_n_t _a_n_a_l_y_s_i_s _f_o_r
_b_i_v_a_r_i_a_t_e _d_a_t_a

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

     Bandwidth matrices for kernel discriminant analysis for bivariate
     data.

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

     Hkda(x, x.group, Hstart, bw="plugin", nstage=2, pilot="samse",pre="sphere")
     Hkda.diag(x, x.group, bw="plugin", nstage=2, pilot="samse", pre="sphere")

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

       x: matrix of training data values

 x.group: vector of group labels for training data

      bw: bandwidth: '"plugin"' = plug-in, '"lscv"' = LSCV,  '"scv"' =
          SCV

  nstage: number of stages in the plug-in bandwidth selector (1 or 2)

   pilot: '"amse"' = AMSE-optimal pilot bandwidths, '"samse"' = single
          SAMSE-optimal pilot bandwidth

     pre: '"scale"' = pre-scaling, '"sphere"' = pre-sphering

  Hstart: (stacked) matrix of initial bandwidth matrices, used in
          numerical optimisation

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

     The values that valid for 'bw' are '"plugin", "lscv"' and '"scv"'
     for 'Hkda'.  These in turn call 'Hpi', 'Hlscv' and 'Hscv'. For
     plugin selectors, all of 'nstage', 'pilot' and 'pre' need to be
     set. For SCV selectors, currently 'nstage' is always programmed to
     be one but the other two need to be set.  For LSCV selectors, none
     of them are required. 

     For 'Hkda.diag', only '"plugin"' or '"lscv"' are valid which in
     turn call  'Hpi.diag'  and 'Hlscv.diag'. Again, 'nstage', 'pilot'
     and 'pre' are available for 'Hpi.diag' but not required for
     'Hlscv.diag'.

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

     Stacked matrix of bandwidth matrices for each training data group.

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

     Duong, T. (2004) _Bandwidth Matrices for Multivariate Kernel
     Density  Estimation._ Ph.D. Thesis. University of Western
     Australia. 

     Simonoff, J. S. (1996) _Smoothing Methods in Statistics_.
     Springer-Verlag. New York.

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

     'kda.kde', 'Hpi', 'Hpi.diag', 'Hlscv', 'Hlscv.diag', 'Hscv'

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

     library(MASS)
     data(iris)
     iris.mat <- rbind(iris[,,1], iris[,,2], iris[,,3])
     ir <- iris.mat[,c(1,2)]
     ir.gr <- iris.mat[,5]

     Hkda(ir, ir.gr, bw="scv", pre="scale")
     Hkda.diag(ir, ir.gr, bw="plugin", pre="scale")

