UndoPointsUpdate {adlift}R Documentation

UndoPointsUpdate

Description

This function undoes the update lifting step in the inverse transform.

Usage

UndoPointsUpdate(X, coeff, nbrs, index, remove, r, N, pointsin, gamweights,
 lengths, lengthrem)

Arguments

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.

index

the indices into pointsin of nbrs, the neighbours of remove, the point to be added.

remove

the index (into X) of the point to be added.

r

the index into pointsin of the added point, remove.

N

length(pointsin).

pointsin

The indices of gridpoints still to be added.

gamweights

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.

lengthrem

the interval length associated to the point to be added.

Details

This procedure uses minimum norm update coefficients to invert the update step of the transform. The prediction weights are used to change the interval lengthsm before the update weights are used to modify coeff.

Value

coeff

vector of (modified) detail and scaling coefficients to be used later in the transform.

lengths

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

alpha

the weights used to modify lengths and coeff.

Author(s)

Matt Nunes (nunesrpackages@gmail.com), Marina Knight

See Also

AdaptNeigh, AdaptPred, CubicPred, invtnp, LinearPred, PointsUpdate, QuadPred

Examples

#
# Generate some blocks data: 100 observations.
#
x <- runif(100)
y <-make.signal2("blocks",x=x)
#
#find initial interval lengths...
#
I<-intervals(x,"reflect")
lengths<-lengthintervals(x,I,neighbours=2,closest=FALSE)
#
#perform prediction step...
p<-AdaptNeigh(order(x),x,y,32,5,TRUE,2)
#
#
u<-PointsUpdate(x,p$results[[6]],p$newinfo[[2]],p$newinfo[[3]],5,order(x),p$results[[4]],
lengths)
#
p2<-setdiff(order(x),5)
a<-which(order(x)==5)
l2<-lengths[setdiff(1:100, a)]
#
#remove the lifted coefficient
#
#now undo the update step...
#
undo<-UndoPointsUpdate(x,u$coeff,p$newinfo[[2]],p$newinfo[[3]],5,a,99,p2,
p$results[[4]],l2,lengths[a])
#


[Package adlift version 1.4-5 Index]