Description Usage Arguments Value Examples
View source: R/TwoDimensional.R
Takes in a vector of coefficients and returns the same vector, but with entries forced to zero that correspond to the desired wavelet levels
1 | threshold2d(beta, numLevels, remove.x, remove.y)
|
beta |
Vector of wavelet coefficients |
numLevels |
Number of wavelet levels. Should be an integer between 2 and 10 |
remove.x |
Vector of wavelet levels in the X direction that you want removed. Should contain numbers between 1 and numLevels |
remove.y |
Vector of wavelet levels in the Y direction that you want removed. Should contain numbers between 1 and numLevels |
A vector of wavelet coefficients with those corresponding to basis functions involving levels in remove.x or remove.y set to zero
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.