Hello,

My question might not be appropriate for this list as it relates to the 'wavelet' package; apologies if it's not. But, a lot of geographers and others make use of wavelets...

I'm been experimenting with dwt and I can't match the results using a manual calculation (which agrees with the 'Numerical Recipes in F77' wtstep routine).

As an example, here are data and the dwt command line:

X <- c(1,2,3,1)
dwt(X, filter = "d4", 1)
So, the Daubechies 4 wavelet and 1 level (with the default boundary="periodic", so the filter it wraps around). The key parts of the output:

Slot "W":
$W1
           [,1]
[1,] -1.0953353
[2,]  0.3882286

Slot "V":
$V1
         [,1]
[1,] 1.638357
[2,] 3.311390

Slot "filter":
Filter Class: Daubechies
Name: D4
Length: 4
Level: 1
Wavelet Coefficients: -1.2941e-01 -2.2414e-01 8.3652e-01 -4.8296e-01
Scaling Coefficients: 4.8296e-01 8.3652e-01 2.2414e-01 -1.2941e-01

I would expect smooth coefficients (V) of 2.6990, 2.2507 and detail coefficients (W) of 1.4489, -0.7418, and I can't work out where 'dwt' differs.

Any comments would be appreciated (even if it's just to tell me to mail another list!).

Chris

	[[alternative HTML version deleted]]

