basisfns               package:adlift               R Documentation

_b_a_s_i_s_f_n_s

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

     This function plots all mother and father wavelets associated with
     a given wavelet transform.

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

     basisfns(x, f, pred, neigh, int, clo, keep, plot.f = FALSE, plot.bas = FALSE,
      separate = FALSE)

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

       x: a gridpoint vector.

       f: the vector of associated function values.

    pred: The type of regression to be performed. Possible options are
          'LinearPred', 'QuadPred', 'CubicPred', 'AdaptPred' and
          'AdaptNeigh'.

   neigh: The number of neighbours over which the regression is
          performed at each step. If 'closest' is false, then this in
          fact denotes the number of neighbours on each side of the
          removed point.

     int: Indicates whether or not the regression curve includes an
          intercept.

     clo: Refers to the configuration of the chosen neighbours. If
          'closest' is false, the neighbours will be chosen
          symmetrically around the removed point. Otherwise, the
          closest neighbours will be chosen.

    keep: The number of scaling coefficients to be kept in the final
          representation of the initial signal. This must be at least
          two.

  plot.f: a boolean value indicating whether to plot the original
          function or not. If so, the signal is plotted with vertical
          coloured lines, showing which prediction method was used on
          the different parts of the signal. The plot also shows which
          gridpoints correspond to scaling functions.

plot.bas: subset of '1:length(f)', denoting which basis functions to
          plot. Each basis function is colour-coded according to which
          prediction scheme was used in the lifting of the
          corresponding gridpoint.

separate: a boolean argument indicating if the basis functions should
          be plotted on a single graphsheet.

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

     The procedure constructs 'W', the matrix representation of the
     forward transform specified in the arguments to the function, and
     then uses the inverse matrix to calculate the vectors of basis
     function values: to work out the basis function values, one
     inverts the transform with a delta vector, with a one in the
     position corresponding to the basis function required. Since this
     is equivalent to pre-multiplying the delta vector by the matrix
     representation for the inverse transform (W^{-1}), the basis
     function values are precisely the columns of W^{-1}. The procedure
     then plots the basis functions (each on a separate graphsheet, if
     chosen), colour coded according to the prediction scheme used or
     whether it is a scaling function.

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

     out: the output from the forward transform which is specified in
          the arguments to this function

pointsin: the vector of indices of points still to be removed.

 schhist: a character string vector of the prediction scheme used for
          the prediction of each gridpoint (in the order of 'x').

 inthist: vector of boolean values indicating whether an intercept was
          used in the prediction steps during the transform (in the
          order of 'x'). 

  basmat: a matrix of wavelet basis function values. The row i
          represents the function values corresponding to the grid for
          the basis function associated to the gridpoint i.

_N_o_t_e:

     If 'plot.bas=T', since the function produces one graph for each
     gridpoint, R or Splus is likely to exceed the total number of open
     devices for large datasets.

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

     Matt Nunes (matt.nunes@bristol.ac.uk), Marina Popa
     (Marina.Popa@bristol.ac.uk)

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

     'fwtnp','transmatdual'

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

     #create test signal data
     #
     x<-runif(100)
     y<-make.signal2("blocks",x=x)
     #
     #perform procedure...
     #
     a<-basisfns(x,y,AdaptNeigh,2,TRUE,TRUE,2,FALSE,c(1,14,15),FALSE)
     #
     #this produces plots of three basis functions all on one graph.

