Skip to content

Commit

Permalink
... update studentized bootstrap ...
Browse files Browse the repository at this point in the history
  • Loading branch information
Brice Maxime Hugues Ozenne committed Sep 15, 2023
1 parent 0447c42 commit 86385c6
Show file tree
Hide file tree
Showing 6 changed files with 710 additions and 75 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: BuyseTest
Type: Package
Title: Generalized Pairwise Comparisons
Version: 3.0.0
Date: 2023-07-18
Date: 2023-09-15
Authors@R: c(
person("Brice", "Ozenne", role = c("aut", "cre"), email = "brice.mh.ozenne@gmail.com", comment = c(ORCID = "0000-0001-9694-2956")),
person("Julien", "Peron", role = "ctb"),
Expand Down
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
- bounds for the confidence intervals have been renamed: CIinf.Delta
-> lower.ci and CIsup.Delta -> upper.ci
- stratified argument has been renamed strata.
- studentized bootstrap is now centered around the estimate instead of
the empirical mean of the bootstrap sample.
- the effect of the seed argument in BuyseTest and powerBuyseTest has
been changed. Instead of setting the seed at the start of the
function, now the seed is used to generate sample or simulation
Expand Down
7 changes: 4 additions & 3 deletions R/S4-BuyseTest-confint.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Created: maj 19 2018 (23:37)
## Version:
## By: Brice Ozenne
## Update #: 1089
## Update #: 1092
##----------------------------------------------------------------------
##
### Commentary:
Expand Down Expand Up @@ -831,9 +831,10 @@ confint_studentBootstrap <- function(Delta, Delta.se, Delta.resampling, Delta.se
outTable[,"se"] <- backtransform.se(Delta, se = Delta.se)

## ** critical quantile
## z-transformation: center around 0 and divide by estimated se
## z-transformation: center around estimate and divide by estimated se
if(length(index.var)>0){
Delta.statH0.resampling <- apply(Delta.resampling[,index.var,drop=FALSE], MARGIN = 2, FUN = scale, scale = FALSE, center = TRUE)/Delta.se.resampling[,index.var,drop=FALSE]
Delta.statH0.resampling <- sweep(Delta.resampling[,index.var,drop=FALSE], MARGIN = 2, FUN = "-", STATS = Delta)/Delta.se.resampling[,index.var,drop=FALSE]
## Delta.statH0.resampling <- apply(Delta.resampling[,index.var,drop=FALSE], MARGIN = 2, FUN = scale, scale = FALSE, center = TRUE)/Delta.se.resampling[,index.var,drop=FALSE]

if(!is.na(alpha)){

Expand Down
Loading

0 comments on commit 86385c6

Please sign in to comment.