Skip to content

Commit

Permalink
changes requested by CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
pbiecek committed Aug 20, 2023
1 parent 18fceb9 commit 39506cf
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 21 deletions.
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ddst
Title: Data Driven Smooth Tests
Version: 1.6.9
Version: 1.6.10
Authors@R: c(person("Przemyslaw", "Biecek", email = "przemyslaw.biecek@gmail.com", role = c("aut", "cre")),
person("Teresa", "Ledwina", email = "ledwina@impan.pl", role = c("aut")),
person("Grzegorz", "Wylupek", role = c("aut"))
Expand All @@ -12,7 +12,6 @@ Description: Smooth tests are data driven (alternative hypothesis is dynamically
and uniform distribution.
Among nonparametric tests there are tests for stochastic dominance,
k-sample test, test with umbrella alternatives and test for change-point problems.
Find a detailed description for these tests at TODO.
License: GPL-2
Encoding: UTF-8
LazyData: true
Expand All @@ -26,7 +25,7 @@ Imports:
Suggests:
rmutil,
knitr
RoxygenNote: 7.1.1
URL: https://pbiecek.github.io/ddst/
BugReports: https://github.com/pbiecek/ddst/issues
VignetteBuilder: knitr
RoxygenNote: 7.2.3
7 changes: 3 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
ddst.normbounded.test - już nie ma argumentu B/nr ponieważ p-wartość liczona jest analitycznie
argument B zamieniony na nr
domyślna wartość B zamieniona z 10000 na 100000
compute.p zamienione z FALSE na TRUE
ddst 1.6.10
----------------

* changes requested by CRAN

ddst 1.6.7
----------------
Expand Down
2 changes: 2 additions & 0 deletions R/ddst.evd.test.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#' # for given vector of 19 numbers
#' z <- c(13.41, 6.04, 1.26, 3.67, -4.54, 2.92, 0.44, 12.93, 6.77, 10.09,
#' 4.10, 4.04, -1.97, 2.17, -5.38, -7.30, 4.75, 5.63, 8.84)
#' \dontrun{
#' t <- ddst.evd.test(z, compute.p = TRUE, d.n = 10)
#' t
#' plot(t)
Expand All @@ -64,6 +65,7 @@
#' t <- ddst.evd.test (x, compute.p = TRUE, d.n = 10)
#' t
#' plot(t)
#' }
#' @keywords htest
`ddst.evd.test` <-
function(x,
Expand Down
3 changes: 2 additions & 1 deletion R/ddst.exp.test.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#' set.seed(7)
#' # H0 is true
#' z <- rexp(80,4)
#' \dontrun{
#' t <- ddst.exp.test (z, compute.p = TRUE, d.n = 10)
#' t
#' plot(t)
Expand All @@ -41,7 +42,7 @@
#' (t = ddst.exp.test (z, compute.p = TRUE, d.n = 10))
#' t$p.value
#' plot(t)
#'
#' }
#' @keywords htest
#' @aliases ddst.exp.Nk
#'
Expand Down
2 changes: 1 addition & 1 deletion R/ddst.forstochdom.test.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' @param compute.p a logical value indicating whether to compute a p-value or not
#' @param compute.cv a logical value indicating whether to compute a critical value corresponding to the significance level alpha or not
#'
#' @references Nonparametric tests for stochastic ordering. Ledwina and Wyłupek (2012) \url{https://doi.org/10.1007/s11749-011-0278-7}
#' @references Nonparametric tests for stochastic ordering. Ledwina and Wyłupek (2012) <doi:10.1007/s11749-011-0278-7>
#' @export
#' @examples
#' set.seed(7)
Expand Down
6 changes: 3 additions & 3 deletions R/ddst.ksample.test.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
## n <- c(length(x),
## sapply(list(...), length))
## }
coord = ddst.ksample.Nk(x.vector, n, d_N = d.n, c = c)
coord = ddst.ksample.Nk(x.vector, n, d_N = d.N, c = c)

l = coord$score
attr(l, "names") = "WT"
Expand All @@ -67,8 +67,8 @@
result$data.name = paste(paste(as.character(substitute(x)), collapse = ""),
", c: ",
c,
", d.n: ",
d.n,
", d.N: ",
d.N,
sep = "")
class(result) = c("htest", "ddst.test", "ddst.ksample.test")

Expand Down
3 changes: 2 additions & 1 deletion R/ddst.normunbounded.test.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#' @param nr an integer specifying the number of runs for a critical value computation
#' @param compute.cv a logical value indicating whether to compute a critical value corresponding to the significance level alpha or not
#' @param n sample size
#' @param ... further arguments
#'
#' @export
#'
Expand All @@ -31,6 +30,7 @@
#' # let's look on first 20 coordinates
#' d.n <- 20
#'
#' \dontrun{
#' # calculate finite sample corrections
#' # see 6.2. Composite null hypothesis H in the appendix materials
#' e.v <- ddst.normunbounded.bias(n = length(z))
Expand Down Expand Up @@ -68,6 +68,7 @@
#' t <- ddst.normubounded.test(z, d.n, e.v$e.0, e.v$v.0, r.alpha, s)
#' t
#' plot(t)
#' }
#' @rdname ddst.normunbounded.test
#'
`ddst.normubounded.test` <-
Expand Down
4 changes: 2 additions & 2 deletions R/ddst.twosample.test.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @param y a (non-empty) numeric vector of data
#' @param d.N an integer specifying the maximum dimension considered, only for advanced users
#' @param c a calibrating parameter in the penalty in the model selection rule
#' @param nr an integer specifying the number of runs for a p-value and a critical value computation if any
#' @param B an integer specifying the number of runs for a p-value and a critical value computation if any
#' @param compute.p a logical value indicating whether to compute a p-value or not
#' @param alpha a significance level
#' @param compute.cv a logical value indicating whether to compute a critical value corresponding to the significance level alpha or not
Expand Down Expand Up @@ -41,7 +41,7 @@
compute.p = TRUE,
alpha = 0.05,
compute.cv = TRUE) {
res <- ddst.ksample.test(list(x, y), d.N = d.N, c = c, nr = nr, compute.p = compute.p,
res <- ddst.ksample.test(list(x, y), d.N = d.N, c = c, nr = B, compute.p = compute.p,
alpha = alpha, compute.cv = compute.cv)
res$coordinates <- res$coordinates[1,]
res$method <- "Data Driven Smooth Test for Two-Sample Problem"
Expand Down
2 changes: 2 additions & 0 deletions R/ddst.uniform.test.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#' set.seed(7)
#' # H0 is true
#' z <- runif(80)
#' \dontrun{
#' t <- ddst.uniform.test(z, compute.p = TRUE, d.n = 10)
#' t
#' plot(t)
Expand All @@ -51,6 +52,7 @@
#' (t <- ddst.uniform.test(z, compute.p = TRUE, d.n = 10))
#' t$p.value
#' plot(t)
#' }
#' @keywords htest
`ddst.uniform.test` <-
function(x,
Expand Down
2 changes: 2 additions & 0 deletions man/ddst.evd.test.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/ddst.exp.test.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/ddst.forstochdom.test.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/ddst.normunbounded.test.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/ddst.twosample.test.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/ddst.uniform.test.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 39506cf

Please sign in to comment.