diff --git a/README.Rmd b/README.Rmd index 46ecb16..d6ab5d1 100644 --- a/README.Rmd +++ b/README.Rmd @@ -9,6 +9,7 @@ always_allow_html: yes ```{r, include = FALSE, cache = FALSE} +library(cTOST) knitr::opts_chunk$set( collapse = TRUE, comment = "#>", @@ -34,34 +35,124 @@ asciicast::init_knitr_engine( [![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/grand-total/cTOST)](https://www.r-pkg.org/pkg/cTOST) -## `cTOST` Overview +## 1. `cTOST` Overview -This R package contains the functions to test equivalence in univariate and multivariate settings based on the Two One-Sided Tests (TOST). In addition, the package contains different corrective procedures applied to the standard TOST in order to adjust the size of the procedure at the desired nominal level leading to more powerful procedures. This package implements the $\alpha$-TOST and $\delta$-TOST methods proposed in Boulaguiem et al. (2024a) and in Boulaguiem et al. (2024b). +This R package contains functions for testing equivalence in both univariate and multivariate settings, based on the Two One-Sided Tests (TOST). The `cTOST` package implements the $\alpha$-TOST and $\delta$-TOST methods proposed by Boulaguiem et al. (2024a, 2024b). These two corrective procedures that can be applied to the standard TOST to adjust the size of the procedure to the desired nominal level, resulting in more powerful procedures. -## Install Instructions +## 2. Install Instructions -The `cTOST` package is available on GitHub at the moment. It is subject to ongoing updates that may lead to stability issues. +The `cTOST` package is available on cran and on GitHub. The version on GitHub is subject to ongoing updates that may lead to stability issues. -In order to install the package, it is required to pre-install the `devtools` dependency. Run the following command if you do not have it already installed: +The package can from cran as follows: -```{r, eval=FALSE} -install.packages("devtools") +```{r, eval = F} +install.packages("cTOST") ``` -The package is then installed with the following command: +The package can also be install from GitHub using the `devtools` package: ```{r, eval=FALSE} +install.packages("devtools") devtools::install_github("stephaneguerrier/cTOST") ``` Note that Windows users are assumed that have Rtools installed (if this is not the case, please visit this [link](https://cran.r-project.org/bin/windows/Rtools/). -## How to use +## 3. How to use + +We provide here a few examples on the usage of the `cTOST` package. More information can be found here: ??? + +### 3.1. Univariate settings + +To illustrate the use of the proposed method in the univariate settings, we consider the `skin` dataset analyzed in Boulaguiem et al. (2024a), which can be loaded as follows: + +```{r} +data(skin) +theta_hat = diff(apply(skin,2,mean)) +nu = nrow(skin) - 1 +sig_hat = sd(apply(skin,1,diff))/sqrt(nu) +``` + +### 3.1.1. Standard TOST + +The standard TOST can be used as follows: + +```{r, eval = F} +stost = tost(theta = theta_hat, sigma = sig_hat, nu = nu, delta = log(1.25)) +stost +``` + +```{asciicast} +library(cTOST) +data(skin) +theta_hat = diff(apply(skin,2,mean)) +nu = nrow(skin) - 1 +sig_hat = sd(apply(skin,1,diff))/sqrt(nu) +stost = tost(theta = theta_hat, sigma = sig_hat, nu = nu, delta = log(1.25)) +stost +``` + +#### 3.1.2. $\alpha$-TOST + +The $\alpha$-TOST can be used through the function `ctost` as follows: + +```{r, eval = F} +atost = ctost(theta = theta_hat, sigma = sig_hat, nu = nu, + delta = log(1.25), method = "alpha") +atost +``` + +```{asciicast} +library(cTOST) +data(skin) +theta_hat = diff(apply(skin,2,mean)) +nu = nrow(skin) - 1 +sig_hat = sd(apply(skin,1,diff))/sqrt(nu) +atost = ctost(theta = theta_hat, sigma = sig_hat, nu = nu, delta = log(1.25), method = "alpha") +atost +``` + +It is possible to compare the results of the $\alpha$-TOST (or $\delta$-TOST, see below) with the standard TOST as follows: + +```{r, eval = F} +compare_to_tost(atost) +``` + +```{asciicast} +library(cTOST) +data(skin) +theta_hat = diff(apply(skin,2,mean)) +nu = nrow(skin) - 1 +sig_hat = sd(apply(skin,1,diff))/sqrt(nu) +atost = ctost(theta = theta_hat, sigma = sig_hat, nu = nu, delta = log(1.25), method = "alpha") +compare_to_tost(atost) +``` + +### 3.1.3. $\delta$-TOST + +The $\delta$-TOST can be used through the function `ctost` as follows: + +```{r} +dtost = ctost(theta = theta_hat, sigma = sig_hat, nu = nu, + delta = log(1.25), method = "delta") +dtost +``` + +```{asciicast} +library(cTOST) +data(skin) +theta_hat = diff(apply(skin,2,mean)) +nu = nrow(skin) - 1 +sig_hat = sd(apply(skin,1,diff))/sqrt(nu) +dtost = ctost(theta = theta_hat, sigma = sig_hat, nu = nu, delta = log(1.25), method = "delta") +dtost +``` -TO DO +### 3.2. Multivariate settings +COMING SOON -## How to cite +## 4. How to cite ```{} @Manual{boulaguiem2024ctost, @@ -73,11 +164,11 @@ TO DO } ``` -## License +## 5. License The license this source code is released under is the GNU AFFERO GENERAL PUBLIC LICENSE (AGPL) v3.0. Please see the LICENSE file for full text. Otherwise, please consult [GNU](https://www.gnu.org/licenses/agpl-3.0.en.html) which will provide a synopsis of the restrictions placed upon the code. -## References +## 6. References Boulaguiem, Y., Quartier, J., Lapteva, M., Kalia, Y. N., Victoria-Feser, M. P., Guerrier, S. & Couturier, D. L., "*Finite Sample Adjustments for Average Equivalence Testing*", Statistics in Medicine, 2024a, [https://doi.org/10.1002/sim.9993]( https://doi.org/10.1002/sim.9993). diff --git a/README.md b/README.md index 566fc6a..18e08b3 100644 --- a/README.md +++ b/README.md @@ -14,32 +14,32 @@ downloads](http://cranlogs.r-pkg.org/badges/cTOST)](https://www.r-pkg.org/pkg/cT downloads](https://cranlogs.r-pkg.org/badges/grand-total/cTOST)](https://www.r-pkg.org/pkg/cTOST) -## `cTOST` Overview +## 1. `cTOST` Overview -This R package contains the functions to test equivalence in univariate -and multivariate settings based on the Two One-Sided Tests (TOST). In -addition, the package contains different corrective procedures applied -to the standard TOST in order to adjust the size of the procedure at the -desired nominal level leading to more powerful procedures. This package -implements the $\alpha$-TOST and $\delta$-TOST methods proposed in -Boulaguiem et al. (2024a) and in Boulaguiem et al. (2024b). +This R package contains functions for testing equivalence in both +univariate and multivariate settings, based on the Two One-Sided Tests +(TOST). The `cTOST` package implements the $\alpha$-TOST and +$\delta$-TOST methods proposed by Boulaguiem et al. (2024a, 2024b). +These two corrective procedures that can be applied to the standard TOST +to adjust the size of the procedure to the desired nominal level, +resulting in more powerful procedures. -## Install Instructions +## 2. Install Instructions -The `cTOST` package is available on GitHub at the moment. It is subject -to ongoing updates that may lead to stability issues. +The `cTOST` package is available on cran and on GitHub. The version on +GitHub is subject to ongoing updates that may lead to stability issues. -In order to install the package, it is required to pre-install the -`devtools` dependency. Run the following command if you do not have it -already installed: +The package can from cran as follows: ``` r -install.packages("devtools") +install.packages("cTOST") ``` -The package is then installed with the following command: +The package can also be install from GitHub using the `devtools` +package: ``` r +install.packages("devtools") devtools::install_github("stephaneguerrier/cTOST") ``` @@ -47,11 +47,82 @@ Note that Windows users are assumed that have Rtools installed (if this is not the case, please visit this [link](https://cran.r-project.org/bin/windows/Rtools/). -## How to use +## 3. How to use + +We provide here a few examples on the usage of the `cTOST` package. More +information can be found here: ??? + +### 3.1. Univariate settings + +To illustrate the use of the proposed method in the univariate settings, +we consider the `skin` dataset analyzed in Boulaguiem et al. (2024a), +which can be loaded as follows: + +``` r +data(skin) +theta_hat = diff(apply(skin,2,mean)) +nu = nrow(skin) - 1 +sig_hat = sd(apply(skin,1,diff))/sqrt(nu) +``` + +### 3.1.1. Standard TOST + +The standard TOST can be used as follows: + +``` r +stost = tost(theta = theta_hat, sigma = sig_hat, nu = nu, delta = log(1.25)) +stost +``` + + + +#### 3.1.2. $\alpha$-TOST + +The $\alpha$-TOST can be used through the function `ctost` as follows: + +``` r +atost = ctost(theta = theta_hat, sigma = sig_hat, nu = nu, + delta = log(1.25), method = "alpha") +atost +``` + + + +It is possible to compare the results of the $\alpha$-TOST (or +$\delta$-TOST, see below) with the standard TOST as follows: + +``` r +compare_to_tost(atost) +``` + + + +### 3.1.3. $\delta$-TOST + +The $\delta$-TOST can be used through the function `ctost` as follows: + +``` r +dtost = ctost(theta = theta_hat, sigma = sig_hat, nu = nu, + delta = log(1.25), method = "delta") +dtost +#> ✖ Can't accept (bio)equivalence +#> Corr. Equiv. Region: |----------------0----------------| +#> Estim. Inter.: (--------------x---------------) +#> CI = (-0.21174 ; 0.25715) +#> +#> Method: delta-TOST +#> alpha = 0.05; Equiv. lim. = +/- 0.22314 +#> Corrected Equiv. lim. = +/- 0.25473 +#> Mean = 0.02270; Stand. dev. = 0.13428; df = 16 +``` + + + +### 3.2. Multivariate settings -TO DO +COMING SOON -## How to cite +## 4. How to cite @Manual{boulaguiem2024ctost, title = {cTOST: Finite Sample Correction of The TOST in The Univariate Framework}, @@ -61,7 +132,7 @@ TO DO url = {https://github.com/stephaneguerrier}, } -## License +## 5. License The license this source code is released under is the GNU AFFERO GENERAL PUBLIC LICENSE (AGPL) v3.0. Please see the LICENSE file for full text. @@ -69,7 +140,7 @@ Otherwise, please consult [GNU](https://www.gnu.org/licenses/agpl-3.0.en.html) which will provide a synopsis of the restrictions placed upon the code. -## References +## 6. References Boulaguiem, Y., Quartier, J., Lapteva, M., Kalia, Y. N., Victoria-Feser, M. P., Guerrier, S. & Couturier, D. L., “*Finite Sample Adjustments for diff --git a/README_files/figure-gfm/unnamed-chunk-10.svg b/README_files/figure-gfm/unnamed-chunk-10.svg index 4b34504..4bd4109 100644 --- a/README_files/figure-gfm/unnamed-chunk-10.svg +++ b/README_files/figure-gfm/unnamed-chunk-10.svg @@ -1 +1 @@ -Accept(bio)equivalenceEquiv.Region:|----------------0----------------|Estim.Inter.:(---------------x--------------)CI=(-0.17654;0.22194)Method:alpha-TOSTalpha=0.05;Equiv.lim.=+/-0.22314Correctedalpha=0.07866Mean=0.02270;Stand.dev.=0.13428;df=16 \ No newline at end of file +TOST:Can'taccept(bio)equivalencealpha-TOST:Accept(bio)equivalenceEquiv.Region:|---------------0---------------|TOST:(---------------x----------------)alpha-TOST:(-------------x--------------)CI-lowCI-highTOST:-0.211740.25715alpha-TOST:-0.176540.22194Equiv.lim.=+/-0.22314 \ No newline at end of file diff --git a/README_files/figure-gfm/unnamed-chunk-12.svg b/README_files/figure-gfm/unnamed-chunk-12.svg index 4bd4109..f63426d 100644 --- a/README_files/figure-gfm/unnamed-chunk-12.svg +++ b/README_files/figure-gfm/unnamed-chunk-12.svg @@ -1 +1 @@ -TOST:Can'taccept(bio)equivalencealpha-TOST:Accept(bio)equivalenceEquiv.Region:|---------------0---------------|TOST:(---------------x----------------)alpha-TOST:(-------------x--------------)CI-lowCI-highTOST:-0.211740.25715alpha-TOST:-0.176540.22194Equiv.lim.=+/-0.22314 \ No newline at end of file +Can'taccept(bio)equivalenceCorr.Equiv.Region:|----------------0----------------|Estim.Inter.:(--------------x---------------)CI=(-0.21174;0.25715)Method:delta-TOSTalpha=0.05;Equiv.lim.=+/-0.22314CorrectedEquiv.lim.=+/-0.25473Mean=0.02270;Stand.dev.=0.13428;df=16 \ No newline at end of file diff --git a/README_files/figure-gfm/unnamed-chunk-6.svg b/README_files/figure-gfm/unnamed-chunk-6.svg new file mode 100644 index 0000000..0715490 --- /dev/null +++ b/README_files/figure-gfm/unnamed-chunk-6.svg @@ -0,0 +1 @@ +Loadingrequiredpackage:PowerTOSTLoadingrequiredpackage:knitrErrorintost(theta=theta_hat,sigma=sig_hat,nu=nu,delta=log(1.25)):argument"alpha"ismissing,withnodefaultError:object'stost'notfound \ No newline at end of file diff --git a/README_files/figure-gfm/unnamed-chunk-8.svg b/README_files/figure-gfm/unnamed-chunk-8.svg index 231c7cf..4b34504 100644 --- a/README_files/figure-gfm/unnamed-chunk-8.svg +++ b/README_files/figure-gfm/unnamed-chunk-8.svg @@ -1 +1 @@ -Loadingrequiredpackage:PowerTOSTLoadingrequiredpackage:knitrCan'taccept(bio)equivalenceEquiv.Region:|---------------0---------------|Estim.Inter.:(---------------x----------------)CI=(-0.21174;0.25715)Method:TOSTalpha=0.05;Equiv.lim.=+/-0.22314Mean=0.02270;Stand.dev.=0.13428;df=16 \ No newline at end of file +Accept(bio)equivalenceEquiv.Region:|----------------0----------------|Estim.Inter.:(---------------x--------------)CI=(-0.17654;0.22194)Method:alpha-TOSTalpha=0.05;Equiv.lim.=+/-0.22314Correctedalpha=0.07866Mean=0.02270;Stand.dev.=0.13428;df=16 \ No newline at end of file diff --git a/_pkgdown.yml b/_pkgdown.yml index 7e0564a..41bec2e 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -6,8 +6,7 @@ reference: - title: TOST functions contents: - tost - - dtost - - atost + - ctost - title: Data contents: - skin diff --git a/docs/articles/get_started.html b/docs/articles/get_started.html index fb6d58e..945d05d 100644 --- a/docs/articles/get_started.html +++ b/docs/articles/get_started.html @@ -52,12 +52,6 @@ -
  • - Get started -
  • -
  • - Reproducibility -
  • Reference
  • @@ -86,7 +80,7 @@

    cTOST Vignette

    - Source: vignettes/get_started.Rmd + Source: vignettes/get_started.Rmd @@ -284,7 +278,7 @@

    References

    -

    Developed by Younes Boulaguiem, Stéphane Guerrier, Dominique-Laurent Couturier.

    +

    Developed by Stéphane Guerrier, Younes Boulaguiem, Dominique-Laurent Couturier, Luca Insolia.

    diff --git a/docs/articles/index.html b/docs/articles/index.html index 563e302..998fdea 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -28,12 +28,6 @@ -
  • - Get started -
  • -
  • - Reproducibility -
  • Reference
  • @@ -69,7 +63,7 @@

    All vignettes

    diff --git a/docs/articles/reproducibility.html b/docs/articles/reproducibility.html index 9f38ee1..2bc66a5 100644 --- a/docs/articles/reproducibility.html +++ b/docs/articles/reproducibility.html @@ -52,12 +52,6 @@ -
  • - Get started -
  • -
  • - Reproducibility -
  • Reference
  • @@ -85,7 +79,7 @@

    Results Reproducibility

    - Source: vignettes/reproducibility.Rmd + Source: vignettes/reproducibility.Rmd
    @@ -109,10 +103,7 @@

    Boulaguiem et al. (2023) can be reproduced as follows:

    -library(cTOST)
    -#> Loading required package: PowerTOST
    -#> Loading required package: cli
    -#> Loading required package: knitr
    +library(cTOST)
     data(skin)
     
     # Empty plot
    @@ -128,7 +119,6 @@ 

    axis(1, at = c(1,2), c("Reference", "Generic"),tick=FALSE) axis(2, at = log(c(250,500,1000,2000,4000)), c(250,500,1000,2000,4000), las=2) axis(2, at = mean(c(min(unlist(skin)),log(4000))), expression(paste("ECZ deposition (ng/cm"^2*")")),padj=-4.5, tick = FALSE)

    -

    Bioequivalence assessment

    @@ -153,22 +143,13 @@

    Standard TOST
     res_tost = tost(theta = theta_hat, sigma = sig_hat, nu = nu, alpha = 0.05, delta = log(1.25))
     res_tost

    -
    -
    -#> Loading required package: PowerTOST                                             
    -#> Loading required package: knitr                                                 
    -#> Warning message:                                                                
    -#> package ‘cTOST’ was built under R version 4.3.2                                 
    -#> ✖ Can't accept (bio)equivalence                                                 
    -#> Equiv. Region:  |---------------0---------------|                               
    -#> Estim. Inter.:   (---------------x----------------)                             
    -#> CI =  (-0.21174 ; 0.25715)                                                      
    -#>                                                                                 
    -#> Method: TOST                                                                    
    -#> alpha = 0.05; Equiv. lim. = +/- 0.22314                                         
    -#> Mean = 0.02270; Stand. dev. = 0.13428; df = 16                                  
    -
    -
    +
    library(cTOST)
    +data(skin)
    +theta_hat = diff(apply(skin,2,mean))
    +nu = nrow(skin) - 1
    +sig_hat = sd(apply(skin,1,diff))/sqrt(nu)
    +res_tost = tost(theta = theta_hat, sigma = sig_hat, nu = nu, alpha = 0.05, delta = log(1.25))
    +res_tost

    @@ -177,38 +158,25 @@

    Using the \(\delta\)-TOST, we still cannot accept bioequivalence, even though the corrected region is larger:

    -
    +
     res_dtost = dtost(theta = theta_hat, sigma = sig_hat, nu = nu, alpha = 0.05, delta = log(1.25))
     res_dtost
    -
    -
    -#> ✖ Can't accept (bio)equivalence                                                 
    -#> Corr. Equiv. Region:  |----------------0----------------|                       
    -#>       Estim. Inter.:     (--------------x---------------)                       
    -#> CI =  (-0.21174 ; 0.25715)                                                      
    -#>                                                                                 
    -#> Method: delta-TOST                                                              
    -#> alpha = 0.05; Equiv. lim. = +/- 0.22314                                         
    -#> Corrected Equiv. lim. = +/- 0.25473                                             
    -#> Mean = 0.02270; Stand. dev. = 0.13428; df = 16                                  
    -
    -
    -
    +
    library(cTOST)
    +data(skin)
    +theta_hat = diff(apply(skin,2,mean))
    +nu = nrow(skin) - 1
    +sig_hat = sd(apply(skin,1,diff))/sqrt(nu)
    +res_dtost = dtost(theta = theta_hat, sigma = sig_hat, nu = nu, alpha = 0.05, delta = log(1.25))
    +res_dtost
    +
     compare_to_tost(res_dtost)
    -
    -
    -#> TOST:       ✖ Can't accept (bio)equivalence                                     
    -#> delta-TOST: ✖ Can't accept (bio)equivalence                                     
    -#>                                                                                 
    -#> Stand. Equiv. Region:    |--------------0--------------|                        
    -#>  Corr. Equiv. Region:  |----------------0----------------|                      
    -#>                 TOST:     (--------------x---------------)                      
    -#>           delta-TOST:     (--------------x---------------)                      
    -#>                                                                                 
    -#>  Standard Equiv. lim. = +/- 0.22314                                             
    -#> Corrected Equiv. lim. = +/- 0.25473                                             
    -
    -
    +
    library(cTOST)
    +data(skin)
    +theta_hat = diff(apply(skin,2,mean))
    +nu = nrow(skin) - 1
    +sig_hat = sd(apply(skin,1,diff))/sqrt(nu)
    +res_dtost = dtost(theta = theta_hat, sigma = sig_hat, nu = nu, alpha = 0.05, delta = log(1.25))
    +compare_to_tost(res_dtost)

    @@ -216,40 +184,25 @@

    However, the \(\alpha\)-TOST allows us to accept bioequivalence:

    -
    +
     res_atost = atost(theta = theta_hat, sigma = sig_hat, nu = nu, alpha = 0.05, delta = log(1.25))
     res_atost
    -
    -
    -#> ✔ Accept (bio)equivalence                                                       
    -#> Equiv. Region:  |----------------0----------------|                             
    -#> Estim. Inter.:     (---------------x--------------)                             
    -#> CI =  (-0.17654 ; 0.22194)                                                      
    -#>                                                                                 
    -#> Method: alpha-TOST                                                              
    -#> alpha = 0.05; Equiv. lim. = +/- 0.22314                                         
    -#> Corrected alpha = 0.07866                                                       
    -#> Mean = 0.02270; Stand. dev. = 0.13428; df = 16                                  
    -
    -
    -
    +
    library(cTOST)
    +data(skin)
    +theta_hat = diff(apply(skin,2,mean))
    +nu = nrow(skin) - 1
    +sig_hat = sd(apply(skin,1,diff))/sqrt(nu)
    +res_atost = atost(theta = theta_hat, sigma = sig_hat, nu = nu, alpha = 0.05, delta = log(1.25))
    +res_atost
    +
     compare_to_tost(res_atost)
    -
    -
    -#> TOST:       ✖ Can't accept (bio)equivalence                                     
    -#> alpha-TOST: ✔ Accept (bio)equivalence                                           
    -#>                                                                                 
    -#> Equiv. Region:  |---------------0---------------|                               
    -#> TOST:            (---------------x----------------)                             
    -#> alpha-TOST:        (-------------x--------------)                               
    -#>                                                                                 
    -#>                  CI - low      CI - high                                        
    -#> TOST:            -0.21174       0.25715                                         
    -#> alpha-TOST:      -0.17654       0.22194                                         
    -#>                                                                                 
    -#> Equiv. lim. = +/- 0.22314                                                       
    -
    -
    +
    library(cTOST)
    +data(skin)
    +theta_hat = diff(apply(skin,2,mean))
    +nu = nrow(skin) - 1
    +sig_hat = sd(apply(skin,1,diff))/sqrt(nu)
    +res_atost = atost(theta = theta_hat, sigma = sig_hat, nu = nu, alpha = 0.05, delta = log(1.25))
    +compare_to_tost(res_atost)
    @@ -258,7 +211,7 @@

    Interval Inclusion Pri

    To visually assess bioequivalence with the interval inclusion principal, we reproduce Figure 5 of Boulaguiem et al. (2023) with the following code:

    -
    +
     # Nominal level and zquivalence bounds
     alpha = 0.05
     delta = log(1.25)
    @@ -312,7 +265,6 @@ 

    Interval Inclusion Pri labels = c("-0.3", expression(paste("-",delta)), "-0.1", "0", "0.1", expression(delta), "0.3"),padj=-0.15,cex.axis=1.3) mtext(expression(theta), side = 1, line = 2.35, cex = 1.4)

    -

    diff --git a/docs/index.html b/docs/index.html index a60069d..9862576 100644 --- a/docs/index.html +++ b/docs/index.html @@ -83,13 +83,12 @@
    -

    -cTOST Overview +

    1. cTOST Overview

    This R package contains the functions to test equivalence in univariate and multivariate settings based on the Two One-Sided Tests (TOST). In addition, the package contains different corrective procedures applied to the standard TOST in order to adjust the size of the procedure at the desired nominal level leading to more powerful procedures. This package implements the α-TOST and δ-TOST methods proposed in Boulaguiem et al. (2024a) and in Boulaguiem et al. (2024b).

    -

    Install Instructions +

    2. Install Instructions

    The cTOST package is available on GitHub at the moment. It is subject to ongoing updates that may lead to stability issues.

    In order to install the package, it is required to pre-install the devtools dependency. Run the following command if you do not have it already installed:

    @@ -101,20 +100,60 @@

    Install Instructionslink.

    -

    How to use +

    3. How to use

    -

    TO DO

    +
    +

    3.1 Uni +

    +
    +data(skin)
    +theta_hat = diff(apply(skin,2,mean))
    +nu = nrow(skin) - 1
    +sig_hat = sd(apply(skin,1,diff))/sqrt(nu)
    +
    +

    3.1.1 α-TOST +

    +
    +atost = ctost(theta = theta_hat, sigma = sig_hat, nu = nu, 
    +              delta = log(1.25), method = "alpha")
    +atost
    +

    +
    +
    +
    +

    +δ-TOST +

    +
    +dtost = ctost(theta = theta_hat, sigma = sig_hat, nu = nu, 
    +              delta = log(1.25), method = "delta")
    +dtost
    +#> ✖ Can't accept (bio)equivalence
    +#> Corr. Equiv. Region:  |----------------0----------------|
    +#>       Estim. Inter.:     (--------------x---------------)
    +#> CI =  (-0.21174 ; 0.25715)
    +#> 
    +#> Method: delta-TOST
    +#> alpha = 0.05; Equiv. lim. = +/- 0.22314
    +#> Corrected Equiv. lim. = +/- 0.25473
    +#> Mean = 0.02270; Stand. dev. = 0.13428; df = 16
    +

    +
    +
    +

    Comparison with TOST +

    +

    How to cite

    -
    @Manual{boulaguiem2024ctost,
    -  title = {cTOST: Finite Sample Correction of The TOST in The Univariate Framework},
    -  author = {Boulaguiem, Y. and Insolia, L. and Couturier, D.-L. and Guerrier, S.},
    -  year = {2024},
    -  note = {R package version 1.1.0},
    -  url = {https://github.com/stephaneguerrier},
    -}
    +
    @Manual{boulaguiem2024ctost,
    +  title = {cTOST: Finite Sample Correction of The TOST in The Univariate Framework},
    +  author = {Boulaguiem, Y. and Insolia, L. and Couturier, D.-L. and Guerrier, S.},
    +  year = {2024},
    +  note = {R package version 1.1.0},
    +  url = {https://github.com/stephaneguerrier},
    +}

    License diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 07b648e..113873d 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -4,5 +4,5 @@ pkgdown_sha: ~ articles: get_started: get_started.html reproducibility: reproducibility.html -last_built: 2024-05-02T15:40Z +last_built: 2024-05-02T16:49Z diff --git a/docs/reference/alphahat.fun.html b/docs/reference/alphahat.fun.html index 023f1d8..6949a59 100644 --- a/docs/reference/alphahat.fun.html +++ b/docs/reference/alphahat.fun.html @@ -28,12 +28,6 @@ -
  • - Get started -
  • -
  • - Reproducibility -
  • Reference
  • @@ -53,7 +47,7 @@
    @@ -100,7 +94,7 @@

    Author

    diff --git a/docs/reference/atost.html b/docs/reference/atost.html index 1ccc5b1..d6a089f 100644 --- a/docs/reference/atost.html +++ b/docs/reference/atost.html @@ -28,12 +28,6 @@ -
  • - Get started -
  • -
  • - Reproducibility -
  • Reference
  • @@ -53,7 +47,7 @@
    @@ -112,18 +106,8 @@

    Examples

    theta_hat = diff(apply(skin,2,mean)) nu = nrow(skin) - 1 sig_hat = sd(apply(skin,1,diff))/sqrt(nu) -res_atost = atost(theta = theta_hat, sigma = sig_hat, nu = nu, +res_atost = cTOST:::atost(theta = theta_hat, sigma = sig_hat, nu = nu, alpha = 0.05, delta = log(1.25)) -res_atost -#> ✔ Accept (bio)equivalence -#> Equiv. Region: |----------------0----------------| -#> Estim. Inter.: (---------------x--------------) -#> CI = (-0.17654 ; 0.22194) -#> -#> Method: alpha-TOST -#> alpha = 0.05; Equiv. lim. = +/- 0.22314 -#> Corrected alpha = 0.07866 -#> Mean = 0.02270; Stand. dev. = 0.13428; df = 16 compare_to_tost(res_atost) #> TOST: #> ✖ Can't accept (bio)equivalence @@ -139,7 +123,6 @@

    Examples

    #> alpha-TOST: -0.17654 0.22194 #> #> Equiv. lim. = +/- 0.22314 -

    @@ -150,7 +133,7 @@

    Examples