Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: power.transform
Title: Location and Scale Invariant Power Transformations
Version: 1.0.2
Version: 1.0.3
Authors@R:
c(
person("Alex", "Zwanenburg",
Expand Down
8 changes: 8 additions & 0 deletions R/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Version 1.0.3

## Changes

- Fixed an error that occurred when assessing if a transformation should be
rejected, but the empirical central normality test p-value could not be
computed.

# Version 1.0.2

## Changes
Expand Down
20 changes: 19 additions & 1 deletion R/R/FindParameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,25 @@ find_transformation_parameters <- function(
transformer = object,
verbose = FALSE)

if (gof_test_p < empirical_gof_normality_p_value) {
if (is.na(gof_test_p)) {
rlang::warn(
message = paste0(
"The p-value of the transformed data (", gof_test_p, ") could not be determined, likely due to an internal error. ",
"The transformation is rejected, and data are kept as is."
),
class = "power_transform_no_transform"
)

object <- methods::new("transformationNone")

object <- .set_transformation_parameters(
object = object,
x = x,
lambda = lambda,
...
)

} else if (gof_test_p < empirical_gof_normality_p_value) {
rlang::warn(
message = paste0(
"The p-value of the transformed data (", gof_test_p, ") is below the required ",
Expand Down
6 changes: 3 additions & 3 deletions R/R/GoodnessOfFit.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ assess_transformation <- function(

if (is.na(h$p_value)) {
message("p-value could not be determined.")
} else if (h$p_value > 0.0001 && verbose) {
} else if (h$p_value < 0.0001 && verbose) {
message("p-value is smaller than 0.0001")
}

Expand Down Expand Up @@ -255,8 +255,8 @@ ecn_test <- function(

# Find those elements that are closest to tau_lookup.
y <- tau - tau_lookup
x[which(y == min(y[y >= 0.0]))] <- TRUE
x[which(y == max(y[y <= 0.0]))] <- TRUE
if (any(y >= 0.0)) x[which(y == min(y[y >= 0.0]))] <- TRUE
if (any(y <= 0.0)) x[which(y == max(y[y <= 0.0]))] <- TRUE

return(x)
}
Expand Down
20 changes: 18 additions & 2 deletions R/cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
This is a new release. R CMD was run locally (windows), and using GitHub Actions on Ubuntu, Mac-OS and Windows.
This is a new release. R CMD was run locally (windows), and using GitHub Actions
on Ubuntu, Mac-OS and Windows for R-latest and R-devel.

Version 1.0.3 prevents the issue leading to the error on
r-devel-linux-x86_64-fedora-gcc for 1.0.2, which was caused by an error in the
data.table package that has been fixed in data.table 1.18.0.

Additionally, R CMD was run with `_R_CHECK_DEPENDS_ONLY_ = True`


# R CMD check results

0 errors | 0 warnings | 1 note
0 errors | 0 warnings | 2 notes

❯ checking CRAN incoming feasibility ... [12s] NOTE
Maintainer: 'Alex Zwanenburg <alexander.zwanenburg@nct-dresden.de>'

New submission

Package was archived on CRAN

CRAN repository db overrides:
X-CRAN-Comment: Archived on 2026-01-15 as issues were not addressed
in time.

❯ checking for future file timestamps ... NOTE
unable to verify current time
20 changes: 20 additions & 0 deletions R/tests/testthat/test-goodness-of-fit.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# Assess whether test should be skipped due to external factors.
x <- stats::rnorm(n = 100L)

transformer <- power.transform::find_transformation_parameters(
x = x,
method = "yeo_johnson",
robust = FALSE,
invariant = FALSE,
estimation_method = "mle"
)

# Compute the p-value.
p_value <- suppressMessages(power.transform::assess_transformation(
x = x,
transformer = transformer
))

testthat::skip_if(is.na(p_value))


parameter_list <- list()
ii <- 1
for (method in c("box_cox", "yeo_johnson", "none")) {
Expand Down
87 changes: 87 additions & 0 deletions manuscript_latex/manuscript.bbl
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,35 @@ Griffin, M.%
\APACaddressPublisher{}{The R Foundation}.
\PrintBackRefs{\CurrentBib}

\bibitem [\protect \citeauthoryear {%
Huber%
}{%
Huber%
}{%
{\protect \APACyear {1964}}%
}]{%
Huber1964-xk}
\APACinsertmetastar {%
Huber1964-xk}%
\begin{APACrefauthors}%
Huber, P.J.%
\end{APACrefauthors}%
\unskip\
\newblock
\APACrefYearMonthDay{1964}{{\APACmonth{03}}}{}.
\newblock
{\BBOQ}\APACrefatitle {Robust estimation of a location parameter} {Robust
estimation of a location parameter}.{\BBCQ}
\newblock
\APACjournalVolNumPages{Ann. Math. Stat.}{35}{1}{73--101,}
\newblock
\begin{APACrefDOI} \doi{10.1214/aoms/1177703732} \end{APACrefDOI}
\newblock

\newblock

\PrintBackRefs{\CurrentBib}

\bibitem [\protect \citeauthoryear {%
Huber%
}{%
Expand Down Expand Up @@ -647,6 +676,38 @@ Rousseeuw, P.J.%

\PrintBackRefs{\CurrentBib}

\bibitem [\protect \citeauthoryear {%
Rousseeuw%
\ \BBA {} Croux%
}{%
Rousseeuw%
\ \BBA {} Croux%
}{%
{\protect \APACyear {1994}}%
}]{%
Rousseeuw1994-ur}
\APACinsertmetastar {%
Rousseeuw1994-ur}%
\begin{APACrefauthors}%
Rousseeuw, P.J.%
\BCBT {}\ \BBA {} Croux, C.%
\end{APACrefauthors}%
\unskip\
\newblock
\APACrefYearMonthDay{1994}{{\APACmonth{08}}}{}.
\newblock
{\BBOQ}\APACrefatitle {The bias of k-step {M}-estimators} {The bias of k-step
{M}-estimators}.{\BBCQ}
\newblock
\APACjournalVolNumPages{Stat. Probab. Lett.}{20}{5}{411--420,}
\newblock
\begin{APACrefDOI} \doi{10.1016/0167-7152(94)90133-3} \end{APACrefDOI}
\newblock

\newblock

\PrintBackRefs{\CurrentBib}

\bibitem [\protect \citeauthoryear {%
Shapiro%
\ \BBA {} Wilk%
Expand Down Expand Up @@ -785,6 +846,32 @@ Tukey, J.W.%
\APACaddressPublisher{}{Addison-Wesley Publishing Company}.
\PrintBackRefs{\CurrentBib}

\bibitem [\protect \citeauthoryear {%
van~der Vaart%
}{%
van~der Vaart%
}{%
{\protect \APACyear {1998}}%
}]{%
van-der-Vaart1998-xu}
\APACinsertmetastar {%
van-der-Vaart1998-xu}%
\begin{APACrefauthors}%
van~der Vaart, A.W.%
\end{APACrefauthors}%
\unskip\
\newblock
\APACrefYearMonthDay{1998}{{\APACmonth{10}}}{}.
\newblock
{\BBOQ}\APACrefatitle {Quantiles and Order Statistics} {Quantiles and order
statistics}.{\BBCQ}
\newblock
\APACrefbtitle {Asymptotic Statistics} {Asymptotic statistics}\ (\BPGS\
304--315).
\newblock
\APACaddressPublisher{Cambridge}{Cambridge University Press}.
\PrintBackRefs{\CurrentBib}

\bibitem [\protect \citeauthoryear {%
von Mises%
}{%
Expand Down
60 changes: 60 additions & 0 deletions manuscript_latex/manuscript.blg
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
This is BibTeX, Version 0.99d
Capacity: max_strings=200000, hash_size=200000, hash_prime=170003
The top-level auxiliary file: manuscript.aux
Reallocating 'name_of_file' (item size: 1) to 11 items.
The style file: sn-apacite.bst
Reallocating 'name_of_file' (item size: 1) to 5 items.
Reallocating 'glb_str_end' (item size: 4) to 20 items.
Reallocating 'glb_str_ptr' (item size: 4) to 20 items.
Reallocating 'global_strs' (item size: 1) to 4000000 items.
Reallocating 'singl_function' (item size: 4) to 100 items.
Reallocating 'wiz_functions' (item size: 4) to 6000 items.
Reallocating 'singl_function' (item size: 4) to 100 items.
Reallocating 'singl_function' (item size: 4) to 100 items.
Reallocating 'wiz_functions' (item size: 4) to 9000 items.
Reallocating 'singl_function' (item size: 4) to 100 items.
Database file #1: refs.bib
apacite.bst [2013/07/21 v6.03 APA bibliography style]
Warning--No address in Powell2009-zb
You've used 34 entries,
7437 wiz_defined-function locations,
1636 strings with 17752 characters,
and the built_in function-call counts, 64320 in all, are:
= -- 8025
> -- 493
< -- 2987
+ -- 3073
- -- 69
* -- 4102
:= -- 11712
add.period$ -- 104
call.type$ -- 34
change.case$ -- 641
chr.to.int$ -- 0
cite$ -- 69
duplicate$ -- 1659
empty$ -- 2579
format.name$ -- 753
if$ -- 12313
int.to.chr$ -- 0
int.to.str$ -- 106
missing$ -- 0
newline$ -- 960
num.names$ -- 274
pop$ -- 1114
preamble$ -- 1
purify$ -- 180
quote$ -- 0
skip$ -- 4144
stack$ -- 0
substring$ -- 3473
swap$ -- 980
text.length$ -- 153
text.prefix$ -- 0
top$ -- 1
type$ -- 2912
warning$ -- 1
while$ -- 291
width$ -- 0
write$ -- 1117
(There was 1 warning)
Binary file modified manuscript_latex/manuscript.pdf
Binary file not shown.
Loading