Learn R Programming

LS2W (version 1.3.6)

D2Amat: Creates the A matrix required for analysing LS2W processes.

Description

This function creates the matrix used to correct the raw periodogram of a LS2W process.

Usage

D2Amat(J, filter.number = 10, family = "DaubLeAsymm", OPLENGTH = 10000, 
switch = "direction", verbose = FALSE)

Value

A matrix of order (3J)*(3J) containing the elements A_(j,l) defined in Eckley, Nason and Treloar (2010). Each element is the sum over all lags of the product of the matrix coefficients of a 2-D DACW matrix at level $j_1$ in direction $ l_1$ with that of another (not necessarily different) matrix of DACW coefficients at level $j_2$ in direction $l_2$. The structure of this matrix is as follows: the rows and columns of the matrix are labeled $1,..., 3J$ in accordance with the notation of Eckley, Nason and Treloar (2010). When switch="direction" the matrix has the following structure:

Levels 1 to J

the different levels of the decomposition in the vertical direction. $1=$fine and $J =$coarse scale.

Levels J+1 to 2J

the different levels in the horizontal direction.

Levels 2J+1 to 3J

the different directions in the diagonal direction.

When switch="level", the row and column elements cycle as follows:\ level 1 vertical, level 1 horizontal, level 1 diagonal, level 2 vertical, etc.

Arguments

J

The level to which the decomposition must extend. This number should be a positive integer.

filter.number

The index of the wavelet used to compute the correction matrix A.

family

The wavelet family used to compute A.

OPLENGTH

This integer variable defines some workspace of length OPLENGTH which is used by the code. If the workspace is not long enough, then the routine will stop and tell you what OPLENGTH should be set to.

switch

Dictates the structure of the matrix [by direction or by scale].

verbose

Allows certain informative messages to be printed on screen.

Author

Idris Eckley

References

Eckley, I.A., Nason, G.P. and Treloar, R.L. (2010) Locally stationary wavelet fields with application to the modelling and analysis of image texture. Journal of the Royal Statistical Society (Series C), 59, 595 - 616.

Eckley, I.A. and Nason, G.P. (2011). LS2W: Implementing the Locally Stationary 2D Wavelet Process Approach in R, Journal of Statistical Software, 43(3), 1-23. URL http://www.jstatsoft.org/v43/i03/.

Examples

Run this code
#
# Let's compute the A matrix for the Haar wavelet in 2-D.
#
D2Amat(J=-2, filter.number=1, family="DaubExPhase", switch="direction")
#       1      2      3      4      5      6
#1 2.2500 1.3125 0.2500 0.3125 0.7500 0.9375
#2 1.3125 4.8125 0.3125 0.5625 0.1875 1.3125
#3 0.2500 0.3125 2.2500 1.3125 0.7500 0.9375
#4 0.3125 0.5625 1.3125 4.8125 0.1875 1.3125
#5 0.7500 0.1875 0.7500 0.1875 2.2500 0.5625
#6 0.9375 1.3125 0.9375 1.3125 0.5625 3.0625
#
# And now for the same matrix structured by level
#
D2Amat(J=-2, filter.number=1, family="DaubExPhase", switch="level")
#       1      2      3      4      5      6
#1 2.2500 0.2500 0.7500 1.3125 0.3125 0.9375
#2 0.2500 2.2500 0.7500 0.3125 1.3125 0.9375
#3 0.7500 0.7500 2.2500 0.1875 0.1875 0.5625
#4 1.3125 0.3125 0.1875 4.8125 0.5625 1.3125
#5 0.3125 1.3125 0.1875 0.5625 4.8125 1.3125
#6 0.9375 0.9375 0.5625 1.3125 1.3125 3.0625

Run the code above in your browser using DataLab