posfd                  package:fda                  R Documentation

_S_m_o_o_t_h _D_a_t_a _w_i_t_h _a _P_o_s_i_t_i_v_e _F_u_n_c_t_i_o_n _u_s_i_n_g _a _R_o_u_g_h_n_e_s_s _P_e_n_a_l_t_y

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

     This function smooths data from a single curve or function using a
     roughness penalty. Unlike function smooth. basis, however, the
     function is constrained to be positive. The function is defined by
     a functional data object Wfdobj, which defines the logarithm of
     the positive function. The roughness of Wfdobj, and hence of the
     positive smoothing function, is definable in a wide variety of
     ways using either derivatives or a linear differential operator.

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

     posfd(y, argvals, Wfdobj, Lfd=3, lambda=0, conv=0.0001, iterlim=20,
           dbglev=1)

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

      y : A vector of observations on a single curve. 

argvals : A vector of argument values corresponding to y. 

 Wfdobj : A functional data object defining a single univariate
          function. 

    Lfd : Either a nonnegative integer or a linear differential
          operator object. If present, the derivative or the value of
          applying the operator is evaluated rather than the functions
          themselves. 

 lambda : A nonnegative value controlling the amount of roughness in
          the data. 

   conv : A criterion for convergence of the iterations. 

iterlim : A limit on the number of iterations. 

 dbglev : Either 0, 1, or 2. This controls the amount information
          printed out on each iteration, with 0 implying no output, 1
          intermediate output level, and 2 full output. 

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

     The computation of the positive function requires iterative
     optimization of the fitting criterion, and is therefore more
     computationally intensive than unconstrained smoothing. For this
     reason, only one curve at a time is allowed to be smoothed. 

     The computational problem of estimating a positive function is
     very similar to that for estimating a density function, except
     that there is no normalizing constraint. For this reason, this
     function has much in common with function densityfd. 

     To plot the positive function or to evaluate it, evaluate Wfdobj,
     and then exponentiate the resulting vector.

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

     A list containing:  Wfdobj  A functional data object defining
     function W(x) that that optimizes the fit to the data of the
     monotone function that it defines.  Flist  A list containing
     results for the final converged solution:  f  The optimal function
     value being minimized.  grad  The gradient vector at the optimal
     solution.  norm  The norm of the gradient vector at the optimal
     solution.  iternum  The number of iterations.  iterhist  A
     iternum+1 by 5 matrix containing the iteration history.

_N_o_t_e:

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

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

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

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

