Irregular2dWavelet: Performing 2d wavelet decomposition

Description Usage Arguments Value Examples

View source: R/TwoDimensional.R

Description

Takes in the location of the data as well as the data values

Usage

1
Irregular2dWavelet(x, y, f, numLevels)

Arguments

x

Vector of locations of the data in the first direction

y

Vector of locations of the data in the second direction

f

Vector of data values observed at the given locations

numLevels

Number of wavelet levels. Should be an integer between 2 and 10

Value

A matrix of wavelet basis functions evaluated at the data as well as the estimated wavelet coefficients

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(BostonPMsim)
numLevels <- 3
Decomp <- Irregular2dWavelet(x=BostonPMsim$long, 
                             y=BostonPMsim$lat,
                             f=BostonPMsim$pm,
                             numLevels=numLevels)

threshold.betalow4 <- threshold2d(Decomp$beta, numLevels, remove.x=4:numLevels, remove.y=4:numLevels)
threshold.fHatlow4 <- Decomp$Zxy%*%threshold.betalow4

threshold.col = colors(100)[as.numeric(cut(threshold.fHatlow4,breaks = 100))]
map("state","massachusetts", xlim=range(BostonPMsim$long), ylim=range(BostonPMsim$lat))
points(BostonPMsim$long, BostonPMsim$lat, col=threshold.col, cex=.2)

jantonelli111/Irregular2dWavelets documentation built on May 18, 2019, 2:39 p.m.