fwtnp(input, f, nkeep = 2, intercept = TRUE,
initboundhandl = "reflect", neighbours = 1,
closest = FALSE, LocalPred = LinearPred, do.W=FALSE, varonly=FALSE)
"reflect"
- the intervals corresponding to the first and last datapoints are taken to have the respective grid values as midpoints; and "
LinearPred
, QuadPred
, CubicPred
, AdaptPred
and AdaptNeigh
.do.W=TRUE
).LocalPred=AdaptNeigh
.Step Two. Compute "integrals" for each point. For each point its integral is the length of the interval associated to the gridpoint.
Step Three. Identify the point to remove as that with the smallest integral. Generally, we remove points in order of smallest to largest integral. The integrals of neighbours of removed points change at each step.
Step Four(a). The neighbours of the removed point are identified using the specified neighbour configuration. The value of
Step Four(b). The integrals and the scaling function values (other
Step Five. Return to step 3 but in the identification of a point to remove the updated integrals are used.
The algorithm continues until as many points as desired are removed. If
do.W=TRUE
, the predict and update lifting steps are used to
propogate coefficient contributions to the transform matrix W
.
If varonly=TRUE
, only the (detail and scaling) coefficient
variances are returned. After each lifting step, the
coefficient variance is computed and the transform matrix
row corresponding to the lifted coefficient is deleted for the
next stage (minimal storage efficiency). The transform matrix is not
returned (i.e. W=NULL
).
AdaptNeigh
, AdaptPred
, CubicPred
, fwtnpmp
, invtnp
, LinearPred
, QuadPred
#
# Generate some one-dimensional data: 100 observations.
#
input <- runif(100)
f <- input^2 - 3*input
#
# Compute fwtnp function on this data
#
out <- fwtnp(input,f,LocalPred=AdaptPred,neighbours=2,closest=TRUE)
#
# That's it.
#
Run the code above in your browser using DataLab