PointsUpdatemp            package:adlift            R Documentation

_P_o_i_n_t_s_U_p_d_a_t_e_m_p

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

     This function performs the update lifting step using a given
     configuration of neighbours and boundary handling.

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

     PointsUpdatemp(X, coeff, nbrs, newnbrs, index, remove, pointsin, weights, lengths,
      updateboundhandl)

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

       X: the vector of grid values.

   coeff: the vector of detail and scaling coefficients at that step of
          the transform.

    nbrs: the indices (into 'X') of the neighbours to be used in the
          lifting step.

 newnbrs: as nbrs, but repeated according to the multiple point
          structure of the grid.

   index: the indices into 'pointsin' of 'nbrs', the neighbours of
          'remove'.

  remove: the index (into 'X') of the point to be removed.

pointsin: The indices of gridpoints still to be removed.

 weights: the prediction weights obtained from the regression in the
          prediction step of the transform.

 lengths: the vector of interval lengths at the present step of the
          transform (to be updated).

updateboundhandl: boundary handling in the update step. Possible values
          are '"reflect"', '"stop"' and '"add"'. If the point to be
          removed is at the boundary, '"reflect"' updates the neighbour
          interval to be symmetrical about its gridpoint; '"stop"'
          extends its length up until the boundary gridpoint; and
          '"add"' increases its interval length by the interval length
          associated to the removed boundary point.

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

     The procedure performs a minimum norm update lifting step. Firstly
     the interval lengths are updated using the coefficients obtained.
     Secondly, the scaling and detail coefficient list is modified
     using the new interval lengths.

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

   coeff: vector of (modified) detail and scaling coefficients to be
          used in the next step of the transform.

 lengths: the vector of interval lengths after the update step of the
          transform.

       r: the index into 'pointsin' of 'remove'.

       N: length('pointsin').

 weights: The regression coefficients used in prediction.

   alpha: the update weights used to update 'lengths' and 'coeff'.

_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:

     'AdaptNeighmp', 'AdaptPredmp', 'CubicPredmp', 'fwtnpmp',
     'LinearPredmp', 'QuadPredmp', 'UndoPointsUpdatemp'

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

     #read in data with multiple values...

     mcdata()

     short<-adjustx(times,accel,"mean")
     X<-short$sepx
     coeff<-short$sepx
     g<-short$g

     coefflist<-list()
     for (i in 1:length(g)){
     coefflist[[i]]<-accel[g[[i]]]
     }

     I<-intervals(X,"reflect")
     l<-lengthintervals(X,I$intervals,neighbours=2,closest=TRUE)
     lengths<-l$lengths

     #work out neighbours of point to be removed (31)

     out<-getnbrs(X,31,order(X),2,TRUE)
     nbrs<-out$n

     nbrs

     newnbrs<-NULL
     for (i in 1:length(nbrs)){
     newnbrs<-c(newnbrs,rep(nbrs[i],times=length(g[[nbrs[i]]])))
     }

     #work out repeated neighbours using g...
     newnbrs

     p<-AdaptNeighmp(order(X),X,coefflist,coeff,nbrs,newnbrs,31,TRUE,2,"ave",g)

     nbrs<-p$newinfo[[3]]
     nbrs
     newnbrs<-NULL
     for (i in 1:length(nbrs)){
     newnbrs<-c(newnbrs,rep(nbrs[i],times=length(g[[nbrs[i]]])))
     }
     newnbrs

     coefflist[[31]]<-p$results[[6]][31]

     u<-PointsUpdatemp(X,coefflist,p$newinfo[[3]],newnbrs,p$newinfo[[4]],31,order(X),p$results[[4]]
     ,lengths,"add")
     #
     #and here is the updated coefficient list...
     u$coeff

