Package unbalhaar. February 20, 2015

Similar documents
Package depth.plot. December 20, 2015

Package scio. February 20, 2015

Package BayesNI. February 19, 2015

Package R1magic. April 9, 2013

Package FDRSeg. September 20, 2017

Package ChIPtest. July 20, 2016

Package spcov. R topics documented: February 20, 2015

Package R1magic. August 29, 2016

Package rbvs. R topics documented: August 29, Type Package Title Ranking-Based Variable Selection Version 1.0.

Package BNN. February 2, 2018

Package darts. February 19, 2015

Package factorqr. R topics documented: February 19, 2015

Package CompQuadForm

Package EnergyOnlineCPM

Package ShrinkCovMat

Package severity. February 20, 2015

Package horseshoe. November 8, 2016

Package noise. July 29, 2016

Package icmm. October 12, 2017

Package NORMT3. February 19, 2015

Package sbgcop. May 29, 2018

Package LIStest. February 19, 2015

Package gtheory. October 30, 2016

Package WaveletArima

Package dhsic. R topics documented: July 27, 2017

Package IndepTest. August 23, 2018

Package eel. September 1, 2015

Package DTK. February 15, Type Package

Package clogitboost. R topics documented: December 21, 2015

Package ltsbase. R topics documented: February 20, 2015

Package bmem. February 15, 2013

Package TSF. July 15, 2017

Package polypoly. R topics documented: May 27, 2017

Package SEMModComp. R topics documented: February 19, Type Package Title Model Comparisons for SEM Version 1.0 Date Author Roy Levy

Package comparec. R topics documented: February 19, Type Package

Package alabama. March 6, 2015

Package flexcwm. R topics documented: July 11, Type Package. Title Flexible Cluster-Weighted Modeling. Version 1.0.

Package monmlp. R topics documented: December 5, Type Package

Package DiscreteLaplace

Package locfdr. July 15, Index 5

Package mixture. R topics documented: February 13, 2018

Package flexcwm. R topics documented: July 2, Type Package. Title Flexible Cluster-Weighted Modeling. Version 1.1.

Package dhga. September 6, 2016

Package rgabriel. February 20, 2015

Package goftest. R topics documented: April 3, Type Package

Package esreg. August 22, 2017

Package ProDenICA. February 19, 2015

Package emg. R topics documented: May 17, 2018

Package rnmf. February 20, 2015

Package jaccard. R topics documented: June 14, Type Package

Package msir. R topics documented: April 7, Type Package Version Date Title Model-Based Sliced Inverse Regression

Package MultisiteMediation

Package pearson7. June 22, 2016

Multiscale interpretation of taut string estimation

Package msbp. December 13, 2018

Package SCEPtERbinary

Package survidinri. February 20, 2015

Package CPE. R topics documented: February 19, 2015

Package invgamma. May 7, 2017

Package denseflmm. R topics documented: March 17, 2017

Package condmixt. R topics documented: February 19, Type Package

Package BootWPTOS. R topics documented: June 30, Type Package

Package GD. January 12, 2018

Package covsep. May 6, 2018

Package pfa. July 4, 2016

Package symmoments. R topics documented: February 20, Type Package

Package asus. October 25, 2017

Package sindyr. September 10, 2018

Package SimSCRPiecewise

Package NonpModelCheck

Package weightquant. R topics documented: December 30, Type Package

Package OrdNor. February 28, 2019

Package spatial.gev.bma

Package coop. November 14, 2017

Package netcoh. May 2, 2016

Package CopulaRegression

Package mlmmm. February 20, 2015

Package RI2by2. October 21, 2016

Package bivariate. December 10, 2018

Package RootsExtremaInflections

Package hwwntest. R topics documented: August 3, Type Package Title Tests of White Noise using Wavelets Version 1.3.

Package jmcm. November 25, 2017

Package mpmcorrelogram

Package babar. R topics documented: February 24, Type Package

Package CovSel. September 25, 2013

Package EMVS. April 24, 2018

Package ENA. February 15, 2013

Package ICGOR. January 13, 2017

Package RcppSMC. March 18, 2018

Package crossreg. February 19, 2015

Package gsarima. February 20, 2015

Package TruncatedNormal

Package leiv. R topics documented: February 20, Version Type Package

Package OSCV. March 18, 2017

Package idmtpreg. February 27, 2018

Package mar. R topics documented: February 20, Title Multivariate AutoRegressive analysis Version Author S. M. Barbosa

Package rela. R topics documented: February 20, Version 4.1 Date Title Item Analysis Package with Standard Errors

Package mhsmm. January 15, 2017

Wild Binary Segmentation for multiple change-point detection

Package RTransferEntropy

Transcription:

Type Package Package unbalhaar February 20, 2015 Title Function estimation via Unbalanced Haar wavelets Version 2.0 Date 2010-08-09 Author Maintainer <p.fryzlewicz@lse.ac.uk> The package implements top-down and bottom-up algorithms for nonparametric function estimation in Gaussian noise using Unbalanced Haar wavelets. License GPL-2 LazyLoad yes Repository CRAN Date/Publication 2012-10-29 08:59:57 NeedsCompilation no R topics documented: unbalhaar-package..................................... 2 best.unbal.haar....................................... 2 best.unbal.haar.bu...................................... 3 hard.thresh......................................... 4 hard.thresh.bu........................................ 5 inner.prod.iter........................................ 6 inner.prod.ma....................................... 7 inner.prod.ma.p...................................... 7 med............................................. 8 reconstr........................................... 9 reconstr.bu.......................................... 9 uh.............................................. 10 uh.bu............................................ 11 unbal.haar.vector...................................... 12 Inde 13 1

2 best.unbal.haar unbalhaar-package Function estimation via Unbalanced Haar wavelets Details The package implements top-down and bottom-up algorithms for nonparametric function estimation in Gaussian noise using Unbalanced Haar wavelets. Package: unbalhaar Type: Package Version: 2.0 Date: 2010-08-09 License: GPL-2 LazyLoad: yes The main functions of the package are uh and uh.bu. Maintainer: <p.fryzlewicz@lse.ac.uk> References P. Fryzlewicz (2007) Unbalanced Haar technique for nonparametric function estimation. Journal of the American Statistical Association, 102, 1318-1327. <- c(rep(0, 100), rep(1, 200)) + rnorm(300) est.topdown <- uh() est.bottomup <- uh.bu() best.unbal.haar Best top-down Unbalanced Haar decomposition The function finds the best top-down Unbalanced Haar (UH) decomposition of the input vector, according to a selection rule (criterion) which specifies which UH vector gets chosen at each scale and location.

best.unbal.haar.bu 3 best.unbal.haar(, criterion = inner.prod.ma) criterion a vector a function which takes a vector of length n and returns an integer between 1 and n-1 tree smooth A list of J matrices, where J represents the number of scales. Each matri is of size 5 (the number of UH coefficients at a given scale). Each column (= vector of length 5) contains an Unbalanced Haar coefficient in the following format: 1st component - an inde of the coefficient; 2nd component - the value of the coefficient; 3rd component - time point where the corresponding UH vector starts; 4th component - last time point before the breakpoint of the UH vector; 5th component - end point of the UH vector. the smooth component of, equal to sum() / sqrt(n), where n is the length of inner.prod.ma, inner.prod.ma.p, best.unbal.haar.bu best.unbal.haar(rnorm(100), inner.prod.ma.p) best.unbal.haar.bu Best bottom-up Unbalanced Haar decomposition The function finds the best bottom-up Unbalanced Haar (UH) decomposition of the input vector. best.unbal.haar.bu(, stretch = length())

4 hard.thresh stretch a vector at each iteration, only the first 1:stretch elements of the current input vector (whose length decreases by one with each iteration) get scanned in the search for the worst-fitting fine-scale Unbalanced Haar wavelet detail smooth A matri of size 3 n-1, where n is the length of, containing the detail coefficients of in the order they were chosen. Each column corresponds to a single coefficient and contains, from top to bottom: location of the coefficient, the associated weight, and the value of the coefficient. the smooth component of, equal to sum() / sqrt(n), where n is the length of best.unbal.haar best.unbal.haar.bu(rnorm(100)) hard.thresh Hard thresholding of a top-down Unbalanced Haar decomposition Presented with an object returned by best.unbal.haar, the function sets to zero those Unbalanced Haar coefficients which fall below a certain threshold sigma. hard.thresh(buh, sigma = 1) buh sigma an object returned by best.unbal.haar containing the decomposition to be thresholded the threshold (a positive scalar)

hard.thresh.bu 5 a thresholded object, of the same class as buh best.unbal.haar, hard.thresh.bu <- rnorm(1000).uh <- best.unbal.haar().uh.th <- hard.thresh(.uh).uh.th.r <- reconstr(.uh.th) ts.plot(.uh.th.r) hard.thresh.bu Hard thresholding of a bottom-up Unbalanced Haar decomposition Presented with an object returned by best.unbal.haar.bu, the function sets to zero those Unbalanced Haar coefficients which fall below a certain threshold sigma. hard.thresh.bu(buh.bu, sigma = 1) buh.bu sigma an object returned by best.unbal.haar.bu containing the decomposition to be thresholded the threshold (a positive scalar) a thresholded object, of the same class as buh.bu best.unbal.haar.bu, hard.thresh

6 inner.prod.iter <- rnorm(1000).uh <- best.unbal.haar.bu().uh.th <- hard.thresh.bu(.uh).uh.th.r <- reconstr.bu(.uh.th) ts.plot(.uh.th.r) inner.prod.iter Inner products with Unbalanced Haar wavelets For an input vector of length n, the function computes inner products between the input vector and all possible n-1 Unbalanced Haar vectors of length n. inner.prod.iter() a vector of length n Details The computation is iterative and is performed in computational time O(n). a vector of length n-1, containing inner products between and consecutive Unbalanced Haar wavelets of length n inner.prod.iter(rnorm(100))

inner.prod.ma 7 inner.prod.ma Unbalanced Haar wavelet which maimises the inner product The function finds the Unbalanced Haar vector which yields the largest (in absolute value) inner product with the input vector. inner.prod.ma() a vector The inde where abs(inner.prod.iter()) is maimised. If two or more maima are found, the med of their locations is returned. inner.prod.iter, med, inner.prod.ma.p inner.prod.ma(c(rep(0, 100), rep(1, 200))) inner.prod.ma.p Unbalanced Haar wavelet which maimises the inner product The function finds the Unbalanced Haar vector which yields the largest (in absolute value) inner product with the input vector, amongst those Unbalanced Haar vectors whose breakpoint is located between 100(1-p)% and 100p% of their support. inner.prod.ma.p(, p = 0.8)

8 med a vector p a scalar in (0.5, 1] The inde where abs(inner.prod.iter()) is maimised on the subinterval (1+floor((1-p)*n)):ceiling(p*n), where n is the length of. If two or more maima are found, the med of their locations is returned. inner.prod.iter, med, inner.prod.ma inner.prod.ma.p(c(rep(0, 100), rep(1, 200)),.55) med Median The function computes the median of a vector. Unlike median, it is guaranteed to return a value which is a component of the input vector. med() a vector a scalar defined as quantile(,.5, type=3)[[1]] med(1:4) median(1:4)

reconstr 9 reconstr Reconstruct a top-down Unbalanced Haar decomposition Reconstructs a vector from its top-down Unbalanced Haar decomposition stored in an object returned by best.unbal.haar or hard.thresh. reconstr(buh) buh an object of the type returned by best.unbal.haar and hard.thresh the inverse Unbalanced Haar transform of buh best.unbal.haar, hard.thresh, reconstr.bu <- rnorm(1000).uh <- best.unbal.haar().uh.th <- hard.thresh(.uh).uh.th.r <- reconstr(.uh.th) ts.plot(.uh.th.r) reconstr.bu Reconstruct a bottom-up Unbalanced Haar decomposition Reconstructs a vector from its bottom-up Unbalanced Haar decomposition stored in an object returned by best.unbal.haar.bu or hard.thresh.bu. reconstr.bu(buh.bu)

10 uh buh.bu an object of the type returned by best.unbal.haar.bu and hard.thresh.bu the inverse Unbalanced Haar transform of buh.bu best.unbal.haar.bu, hard.thresh.bu, reconstr <- rnorm(1000).uh <- best.unbal.haar.bu().uh.th <- hard.thresh.bu(.uh).uh.th.r <- reconstr.bu(.uh.th) ts.plot(.uh.th.r) uh Denoising via top-down Unbalanced Haar Given an input vector of the form signal + iid Gaussian noise, the function estimates the noise level via Median Absolute Deviation, finds the best top-down Unbalanced Haar decomposition (according to the selection rule criterion), thresholds it with the universal threshold, and performs the inverse Unbalanced Haar transform to yield an estimate of the signal. uh(, criterion = inner.prod.ma) criterion a vector of the form signal + iid Gaussian noise a function which takes a vector of length n and returns an integer between 1 and n-1 an estimate of the signal

uh.bu 11 References P. Fryzlewicz (2007) Unbalanced Haar technique for nonparametric function estimation. Journal of the American Statistical Association, 102, 1318-1327. uh.bu, best.unbal.haar, inner.prod.ma, inner.prod.ma.p, hard.thresh, reconstr <- c(rep(0, 100), rep(1, 200)) + rnorm(300) est <- uh() uh.bu Denoising via bottom-up Unbalanced Haar Given an input vector of the form signal + iid Gaussian noise, the function estimates the noise level via Median Absolute Deviation, finds the best bottom-up Unbalanced Haar decomposition, thresholds it with the universal threshold, and performs the inverse Unbalanced Haar transform to yield an estimate of the signal. uh.bu(, stretch = length()) stretch a vector of the form signal + iid Gaussian noise at each iteration, only the first 1:stretch elements of the current input vector (whose length decreases by one with each iteration) get scanned in the search for the worst-fitting fine-scale Unbalanced Haar wavelet an estimate of the signal

12 unbal.haar.vector References P. Fryzlewicz (2007) Unbalanced Haar technique for nonparametric function estimation. Journal of the American Statistical Association, 102, 1318-1327. uh, best.unbal.haar.bu, hard.thresh.bu, reconstr.bu <- c(rep(0, 100), rep(1, 200)) + rnorm(300) est <- uh.bu() unbal.haar.vector Unbalanced Haar vector Computes the non-zero part of an Unbalanced Haar vector with a given start-, break- and end-point. unbal.haar.vector(a) a a three-component vector of integers such that a[1] <= a[2] < a[3]. The three components specify, respectively, the start point, the time point just before the breakpoint, and the endpoint of the desired Unbalanced Haar vector. the non-zero part of the corresponding Unbalanced Haar vector unbal.haar.vector(c(1, 1, 2)) unbal.haar.vector(c(2, 5, 12))

Inde Topic math best.unbal.haar, 2 best.unbal.haar.bu, 3 hard.thresh, 4 hard.thresh.bu, 5 inner.prod.iter, 6 inner.prod.ma, 7 inner.prod.ma.p, 7 med, 8 reconstr, 9 reconstr.bu, 9 uh, 10 uh.bu, 11 unbal.haar.vector, 12 Topic package unbalhaar-package, 2 best.unbal.haar, 2, 4, 5, 9, 11 best.unbal.haar.bu, 3, 3, 5, 10, 12 hard.thresh, 4, 5, 9, 11 hard.thresh.bu, 5, 5, 10, 12 inner.prod.iter, 6, 7, 8 inner.prod.ma, 3, 7, 8, 11 inner.prod.ma.p, 3, 7, 7, 11 med, 7, 8, 8 reconstr, 9, 10, 11 reconstr.bu, 9, 9, 12 uh, 2, 10, 12 uh.bu, 2, 11, 11 unbal.haar.vector, 12 unbalhaar (unbalhaar-package), 2 unbalhaar-package, 2 13