Website for

Stochastic Ordering and ANOVA:

Theory and Applications with

by

Basso D., Pesarin F., Salmaso L., Solari A.

 

Book Cover Page

 

Springer Website

 

 

This website contains the source of the R functions which are included in each chapter’s final section. On-line helps are available just for some functions of the first chapter and should be considered as examples of how to build a permutation test for some basic problems. Please refer to the examples in the book for information on how to use the other functions. The functions are listed according to chapter order. To download the codes, just right-click on the related link and choose the save as option from the menu. Some functions require the basic functions combine.r and t2p.r. To load a function in the R environment, save it within your working directory and type:

 

source(“path/name_function.r”)

 

These codes are provided with absolutely no guarantee. Each chapter’s R code is available as well. For any problem/suggestion, do not hesitate to contact us.

 

R functions:

 

1:         Permutation Tests

           

            These functions are useful to run a multi-variate permutation test through the Nonparametric Combination methodology (NPC).

 

- combine.r                  : performs the nonparametric combination of dependent tests with some combining functions and restricted alternatives; (help)

            - t2p.r                          : obtains a matrix of p-value from a given matrix containing the (multivariate) permutation distribution of the test statistics; (help)

            - permute.r                   : returns the (multivariate) permutation distribution of tests statistics which can be obtained by a linear combination of data; (help)

- ptest2s.r                    : performs multivariate two-sample permutation tests for continuous data based on Student's t statistics;

- clostest.r                   : computes multiplicity adjusted p-values by using the closed testing procedure;

- stepdown.r                : computes multiplicity adjusted p-values by using the step-down procedure;

            - studT.r                      : Student's t test statistic;         

            - Westdata.r                : data-set;

 

            R code

 

2:         Ordinal Data

 

 

- Dchisq.r                    : performs the directed chi-squared test;          

- LRT.r                        : performs the order restricted likelihood ratio test;

- ptestRs.r                    : combined test for comparing R>2 independent samples based on univariate data;

- ptest2s.r                    : performs multivariate two-sample permutation tests for continuous data based on Student's t statistics;

            - studt.r                       : Student's t test statistic;

            - Tmax.r                      : for ordered categorical data, perform the adaptive test based on isotonic regression;             

 

            R code

 

3:         Multivariate Ordinal Data

 

         - permzh.r                      : computes permutation-based marginal tests for two-sample multivariate ordinal data,

 and returns the global significance and the multiplicity adjusted p-values for endpoints and domains;

         -  bootzh.r                      : computes bootstrap-based marginal tests for two-sample multivariate ordinal data,

 and returns the global significance and the multiplicity adjusted p-values for endpoints and domains;

 

            R code

 

4:         Multivariate Continuous Data

 

- ptest2s.r                    : performs multivariate two-sample permutation tests for continuous data based on Student's t statistics;

- pstocrs.r                    : performs the R-sample combined permutation tests for multivariate stochastically ordered continuous data;

- rats.Rdata                 : data-set;

- example4.Rdata        : data-set;

 

            R code

 

5:         Nonparametric One-way ANOVA

 

These functions are suitable for (univariate) one-way ANOVA problems with post-hoc comparisons. The Umbrella alternative is also considered.

 

 

 

- aov_perm.r               : permutation test for one-way ANOVA and post-hoc comparisons;   

- MW.r                       : Mack & Wolfe test for umbrella alternatives; 

- umbrella.r                  : permutation test for umbrella alternatives;

- umbrella_rep.r           : permutation test for umbrella/trend alternatives with repeated measures;

 

            R code

 

6:         Synchronized Permutation Tests in Two-way ANOVA

 

These functions perform constrained/unconstrained permutation tests for Two-way ANOVA and post-hoc comparisons on main effects. A summary of the results and a graphical representation of the permutation confidence intervals suggested by Hsu (1996) are also provided.

 

 

- CSP.r                       : Constrained permutation test;

- USP.r                       : Unconstrained permutation test;

- IC_CSP.r                 : Obtains CSP confidence intervals for main factor post-hoc comparisons;

- IC_USP.r                 : Obtains USP confidence intervals for main factor post-hoc comparisons;

- plot_hsu.r                  : graphical representation for post-hoc comparisons

- synchro_summary.r   : out-put summary for CSP/ USP objects;

 

            R code

 

7:         Permutation Tests for Unreplicated Factorial Designs

 

These functions create the design matrix of a full 2k unreplicated factorial design and perform a permutation test on the greatest 2k -1 effects.  

 

 

- create_design.r          : create the design matrix of a full 2k unreplicated factorial design.

- unreplicated.r            : permutation test for full 2k unreplicated factorial designs.

 

            R code

 

 

 

-         other functions and examples

 

 

 

·         For info, contact: luigi.salmaso@unipd.it