lp                  package:locfit                  R Documentation

_L_o_c_a_l _P_o_l_y_n_o_m_i_a_l _M_o_d_e_l _T_e_r_m

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

     'lp' is a local polynomial model term for Locfit models. Usually,
     it will be the only term on the RHS of the model formula.

     Smoothing parameters should be provided as arguments to 'lp()',
     rather than to 'locfit()'.

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

     lp(..., nn, h, adpen, deg, acri, scale, style)

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

     ...: Predictor variables for the local regression model. 

      nn: Nearest neighbor component of the smoothing parameter.
          Default value is 0.7, unless either 'h' or 'adpen' are
          provided, in which case the default is 0. 

       h: The constant component of the smoothing parameter. Default:
          0. 

   adpen: Penalty parameter for adaptive fitting.

     deg: Degree of polynomial to use.

    acri: Criterion for adaptive bandwidth selection.

   style: Style for special terms ('left', 'ang' e.t.c.). Do not try to
          set this directly; call 'locfit' instead. 

   scale: A scale to apply to each variable. This is especially
          important for multivariate fitting, where variables may be
          measured in non-comparable units. It is also used to specify
          the frequency for 'ang' terms. If 'scale=F' (the default) no
          scaling is performed. If 'scale=T', marginal standard
          deviations are used. Alternatively, a numeric vector can
          provide scales for the individual variables. 

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

     'locfit', 'locfit.raw'

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

     data(ethanol, package="locfit")
     # fit with 50
     fit <- locfit(NOx~lp(E,nn=0.5),data=ethanol)
     # bivariate fit.
     fit <- locfit(NOx~lp(E,C,scale=TRUE),data=ethanol)

     # density estimation
     data(geyser, package="locfit")
     fit <- locfit.raw(lp(geyser,nn=0.1,h=0.8))

