Skip to content

Commit

Permalink
Incorporated waveslim package
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewzm committed Jan 13, 2015
1 parent d335e9e commit 8764cba
Show file tree
Hide file tree
Showing 17 changed files with 56 additions and 2,248 deletions.
21 changes: 10 additions & 11 deletions DESCRIPTION 100644 → 100755
@@ -1,13 +1,11 @@
Package: EFDR
Type: Package
Title: Wavelet-Based Enhanced FDR for Signal Detection in Noisy Images
Version: 1.0
Version: 0.1.0
Date: 2014-10-22
Authors@R: c(person("Andrew", "Zammit-Mangion", role = c("aut", "cre"),
email = "andrewzm@gmail.com"),
person("Hsin-Cheng", "Huang", role = "aut"),
person("Brandon", "Whitcher", role = "ctb",
email = "bwhitcher at gmail.com"))
person("Hsin-Cheng", "Huang", role = "aut"))
Suggests:
knitr,
ggplot2,
Expand All @@ -29,16 +27,17 @@ Description: Enhanced False Discovery Rate (EFDR) is a tool to detect anomalies
American Statistical Association 97.460 (2002): 1122-1140.
Imports:
Matrix,
foreach,
doParallel,
foreach (>= 1.4.2),
doParallel (>= 1.0.8),
waveslim (>= 1.7.5),
parallel,
gstat,
tidyr,
dplyr,
sp
gstat (>= 1.0-19),
tidyr (>= 0.1.0.9000),
dplyr (>= 0.3.0.2),
sp (>= 1.0-15)
URL: http://github.com/andrewzm/EFDR
Depends:
R (>= 3.0)
VignetteBuilder: knitr
License: GPL (>= 2)
NeedsCompilation: yes
NeedsCompilation: no
2 changes: 1 addition & 1 deletion NAMESPACE
Expand Up @@ -16,6 +16,6 @@ import(foreach)
import(gstat)
import(parallel)
import(sp)
import(waveslim)
importFrom(doParallel,registerDoParallel)
importFrom(tidyr,spread)
useDynLib(EFDR)
2 changes: 1 addition & 1 deletion R/EFDR.R
Expand Up @@ -3,13 +3,13 @@
#' @description Enhanced False Discovery Rate (EFDR) is a tool to detect anomalies in an image. The image is first transformed into the wavelet domain in order to decorrelate any noise components, following which the coefficients at each resolution are standardised. Statistical tests (in a multiple hypothesis testing setting) are then carried out to find the anomalies. The power of EFDR exceeds that of standard FDR, which would carry out tests on every wavelet coefficient: EFDR choose which wavelets to test based on a criterion described in Shen et al. (2002). The package also provides elementary tools to interpolate spatially irregular data onto a grid of the required size. The work is based on Shen, X., Huang, H.-C., and Cressie, N. 'Nonparametric hypothesis testing for a spatial signal.' Journal of the American Statistical Association 97.460 (2002): 1122-1140.
#'
#' @docType package
#' @useDynLib EFDR
#' @import Matrix
#' @import parallel
#' @import dplyr
#' @import foreach
#' @import gstat
#' @import sp
#' @import waveslim
#' @importFrom tidyr spread
#' @importFrom doParallel registerDoParallel
#' @name EFDR
Expand Down
12 changes: 8 additions & 4 deletions R/EFDR_functions.R
Expand Up @@ -5,10 +5,9 @@
#' @aliases test.los
#' @aliases test.efdr
#'
#' @description Test for anomalies using either \code{bonferroni}, \code{FDR}, \code{EFDR} or \code{LOS} in the
#' wavelet domain.
#' @description Test for anomalies using either \code{bonferroni}, \code{FDR}, \code{EFDR} or \code{LOS} in the wavelet domain using the 2D wavelet transform.
#' @param Z image of size \code{n1} by \code{2n} where \code{n1,n2} have to be powers of two
#' @param wf type of wavelet to employ. Please see \code{waveslim::wave.filter} for a full list of wavelet names
#' @param wf type of wavelet to employ. Defaults to `la8', the Daubechies orthonormal compactly supported wavelet of length \code{L = 8} (Daubechies, 1992), least asymmetric family. Other options include `haar' (Haar wavelet), `fk8' (Fejer-Korovkin wavelet with \code{L=8}) and `mb8' (minimum-bandwidth wavelet with \code{L=8}). Please type `\code{waveslim::wave.filter}' in the console for a full list of wavelet names
#' @param J number of resolutions to employ in wavelet decomposition
#' @param alpha significance level at which tests are carried out
#' @param n.hyp number of hypotheses tests to carry out with EFDR. If a vector is supplied, the optimal one from
Expand All @@ -27,7 +26,12 @@
#' \item{\code{nhat}}{the number of tests carried out.}
#' }
#' @export
#' @references Shen, X., Huang, H.-C., and Cressie, N. 'Nonparametric hypothesis testing for a spatial signal.' Journal of the American Statistical Association 97.460 (2002): 1122-1140.
#' @references
#'
#' Daubechies, I. (1992) Ten Lectures on Wavelets, CBMS-NSF Regional Conference Series in Applied Mathematics, SIAM: Philadelphia.
#'
#' Shen, X., Huang, H.-C., and Cressie, N. 'Nonparametric hypothesis testing for a spatial signal.' Journal of the American Statistical Association 97.460 (2002): 1122-1140.
#'
#' @examples
#' ## See vignettes by typing vignette("EFDR_vignettes")
test.efdr <- function(Z,wf = "la8",J=3, alpha=0.05,n.hyp=100,b=11,iteration = 200, parallel = 1L)
Expand Down
95 changes: 0 additions & 95 deletions R/waveslim_two_D.R

This file was deleted.

0 comments on commit 8764cba

Please sign in to comment.