cpar                 package:locfit                 R Documentation

_C_o_n_d_i_t_i_o_n_a_l_l_y _p_a_r_a_m_e_t_r_i_c _t_e_r_m _f_o_r _a _L_o_c_f_i_t _m_o_d_e_l.

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

     A term entered in a 'locfit' model formula using 'cpar' will
     result in a fit that is conditionally parametric. If the formula
     is 'y~x1+cpar(x2)', the resulting surface, for fixed 'x1', will be
     quadratic (using the default 'deg=2') in 'x2'. Note that the
     coefficients of the quadratic may depend on 'x1'; this
     distinguishes a conditionally parametric model from a
     semiparametric model.

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

     cpar(x)

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

       x: numeric variable.

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

     'locfit'

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

     data(ethanol)
     # fit a conditionally parametric model
     fit <- locfit(NOx~E+cpar(C),data=ethanol)
     plot(fit)
     # one way to force a parametric fit with locfit
     fit <- locfit(NOx~cpar(E),data=ethanol)

