

nkreg(funfits)                               R Documentation

_N_o_r_m_a_l _k_e_r_n_e_l _r_e_g_r_e_s_s_i_o_n _e_s_t_i_m_a_t_e

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

     nkreg(data.x, data.y, bandwidth, n.points, grid)

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

  data.x: Vector or matrix of independent variables.

  data.y: Vector of the dependent variable

bandwidth: Vector of bandwidths

n.points: Number of equally spaced points to evaluate a uni-
          variate density estimate.

    grid: A vector or matrix of values to evaluate the esti-
          mate.The defautl is to use the data.

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

     A list where x is the points used for evaluation, y the
     density estimates at these points and bandwidths and h
     the vector of bandwidths. If more than one bandwidth is
     given then the estimates are arranged as columns in the
     matrix y.

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

     nkden, nkden.cv, ksmooth

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

     nkreg( auto.paint$thick, auto.paint$DOI, 5.0)-> look
     plot( auto.paint$thick, auto.paint$DOI)
     lines( look$x, look$y)
     plot( look$y, auto.paint$DOI- look$y, xlab="Predicted", ylab="Residuals")

