# WaveThresh Package News

## WaveThresh 4.6.1 Information

WaveThresh, version 4.6.1, is now available from from CRAN (or install.packages() from within R itself). There are four main changes from previous versions:
• Probably the most noticeable change is that the nlevels function has been renamed to be called nlevelsWT. Users will have noticed that with previous versions a message alerting the user to a clash with an already existing function, nlevels which is to do with the number of levels in a statistical factor. Our change of name removes that clash, but legacy code might need to be changed.
• Merging of the cthresh package into WaveThresh. This is because half of the code for this package was effectively within WaveThresh anyway (e.g. wst for complex-valued was in cthresh but the inversion code AvBasis was in WaveThresh!). The way that cthresh was originally meant to work was as a layer on top of WaveThresh, but that is not feasible now, at least in a straightforward way. The new version is a simplification in that there is now only one filter.select, wd, wst, wr.wd function in one package!
• Some functions, such as PsiJ printed out a lot of messages that were not useful. This could be incredibly annoying and these have been removed.
• Some C I/O calls have been removed and changed to calls to Rprintf or REprintf. There are also no longer any calls to exit either.
• Several minor bugfixes.
If you use WaveThresh, or my book, please do reference it.

Enjoy. Guy Nason, Oct 31 2012.

## WaveThresh 4.5 Information

WaveThresh, version 4.5, is now available directly from CRAN (or install.packages() from within R itself). This is now the preferred method of using WaveThresh.

Note that when you install WaveThresh then you have to type:
library("wavethresh") 
to make it work (ie all lower case).

You might be interested in learning WaveThresh in conjunction with the new Springer book Wavelet methods in Statistics with R

If you use WaveThresh, or my book, please do remember to reference it!

Guy Nason
15th March 2010.

# Supplementary material for the book

Supplementary material for my Springer book can be found by clicking here.

Guy Nason
4th August 2008.

# Book Errata

This occurs at lines -14 and -10 on Page 154 and line -14 on page 250.
Page 4
The forward reference to "Figure 2.26 on page 29" is incorrect. The correct forward reference is "Figure 2.4 on page 30".
Line -9 on page 20.
A (9*9=)81 is missing. The total should be 300.
Line -7 on page 29.
Delete word "defined".
Section title 2.2.3.
Replace "from-finer scale" by "from finer-scale".
Equation (2.33) on page 32
Quantity is f0-f1, ie reversed. See comments below relating to formula (2.91) and (2.42).
Line 6 on page 33.
Delete word "defined"
Line -3 on page 44
"two" should be "three" (i.e. three vanishing moments)
Formula (2.56) on Page 46.
Second line of the formula. Of course, Sinc[0] = 1.
Formula (2.91) and (2.42)
The formula for the wavelet coefficients are different by a factor of -1. This makes no material difference (If \psi(x) is a wavelet then \psi(-x) is one too). Indeed, the explanation prior to (2.91) makes it clear that it is a generalization and hence need not be exactly the same!
Line -13 on page 160
The line of code that calls the as.numeric should be:
ix <- as.numeric(dimnames(tb)[[1]]) + 1

Line 13 on page 188. The call to diff, constructing the dBabyECG data set is wrong. It shoud read
> dBabyECG <- diff(c(BabyECG[2], BabyECG))

hazest <- function(z, delta, nbins=32, levN=1, levD=1,
filter.number=8){

Line -10 on page 236. The call to hazest needs another argument: delta (the censoring indicator). The function header on this line should read:
hazest <- function(z, delta, nbins=32, levN=1, levD=1,
filter.number=8){

Line -7 on page 236
The line of code that calls the function subf should be
fsub <- subf(z=z[delta==1], nbins=nbins, filter.number=filter.number,
lev=levN)

Negative line references mean "lines up from bottom". Many thanks to those who pointed these out.

# Survival/Hazard Rate Code

The corrected code (see errata list above) and some further guidance can be found here