inprod                  package:fda                  R Documentation

_I_n_n_e_r _p_r_o_d_u_c_t _o_f _t_w_o _f_u_n_c_t_i_o_n_a_l _d_a_t_a _o_b_j_e_c_t_s _o_r _t_w_o _b_a_s_i_s _o_b_j_e_c_t_s

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

     This is perhaps the most important function in the functional data
     library. Hardly any analysis fails to use inner products in some
     way, and many employ multiple inner products. While in certain
     cases these may be computed exactly, this is a more general
     function that approximates the inner product. The inner product is
     defined by two derivatives or linear differential operators that
     are applied to the first two arguments.

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

     inprod(fd1, fd2, Lfd1=0, Lfd2=0, JMAX=15, EPS=0.0001)

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

    fd1 : Either a univariate functional data object or a basis object. 

     fd2: Either a univariate functional data object or a basis object. 

    Lfd1: Either a nonnegative integer or a linear differential
          operator object. If present, the derivative or the value of
          applying the operator is used rather than the functions
          themselves. This operator is applied to the first argument
          fd1. 

    Lfd2: Either a nonnegative integer or a linear differential
          operator object. If present, the derivative or the value of
          applying the operator is used rather than the functions
          themselves. This operator is applied to the second argument
          fd2. 

    JMAX: This controls the maximum number of function evaluations that
          will be used in the numerical approximation method (see below
          for details). The maximum number is 2**(JMAX-1)+1. The
          default of 15 seems more than adequate for most purposes. 

     EPS: This controls when convergence is declared for the
          approximation method. 

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

     The approximation method is Romberg extrapolation using numerical
     integration by the trapezoidal rule. At each iteration, the number
     of values at which the functions are evaluated is doubled, and a
     polynomial extrapolation method is used to estimate the converged
     integral values as well as an error tolerance. Convergence is
     declared when the relative error falls below EPS for all products.
     The Romberg extrapolation method generally saves at least one and
     often two iterations relative to un-extrapolated trapezoidal
     integration. 

     Functional data analyses will seldom need to use inprod directly,
     but code developers should be aware of its pivotal role. Future
     work may require more sophisticated and specialized numerical
     integration methods. 

     inprod computes the definite integral, but some functions such as
     smooth.monotone and register.fd also need to compute indefinite
     integrals. These use the same approximation scheme, but usually
     require more accuracy, and hence more iterations. 

     When one or both arguments are basis objects, they are converted
     to functional data objects using identity matrices as the
     coefficient matrices. 

     inprod is only called when there is no faster or exact method
     available. In cases where there is, it has been found that the
     approximation is good to about four to five significant digits,
     which is sufficient for most applications. Perhaps surprisingly,
     in the case of B-splines, the exact method is not appreciably
     faster, but of course is more accurate. 

     inprod calls function eval.fd perhaps thousands of times, so high
     efficiency for this function and the functions that it calls is
     important.

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

     A matrix of inner products. The number of rows is the number of
     functions or basis functions in argument fd1, and the number of
     columns is the same thing for argument fd2.

_N_o_t_e:

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

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

     Press, et, al, Numerical Recipes.

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

     monfn, mongrad, bsplinepen, fourierpen

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

