SMR: An R package for computing the externally studentized normal midrange distribution

The main purpose of this paper is to present the main algorithms underlining the con- struction and implementation of the SMR package, whose aim is to compute studentized normal midrange distribution. Details on the externally studentized normal midrange and standardized normal midrange distributions are also given. The package follows the same structure as the prob- ability functions implemented in R. That is: the probability density function (dSMR), the cumulative distribution function (pSMR), the quantile function (qSMR) and the random number generating function (rSMR). Pseudocode and illustrative examples of how to use the package are presented. Computations of the required multidimensional integrations should be done numerically. There- fore, Batista and Ferreira (2014) applied Gaussian quadrature for this task. In particular, they chose the Gauss-Legendre quadrature for solving numerical integrations, because it obtains more accurate results when compared with other Gaussian quadrature methods. The quantile function of the exter- nally studentized normal midrange was computed by the Newton-Raphson method. Based on these numerical methods, the SMR package was built and released. The package name was chosen to identify the Studentized MidRange distribution. The package follows the same structure as the probability functions implemented in R. The following functions were implemented in the package: the probability density function (dSMR), the cumulative distribution function (pSMR), the quantile function (qSMR), and the random number generating function (rSMR). Therefore, the main purpose of this paper is to present the main algorithms underlining the construction and implementation of the SMR package, showing pseudocode of its functions and providing the fundamental ideas for the appropriate use of the package through illustrative examples. First, details on the externally studentized normal midrange and standardized normal midrange distributions are given. Second, the algorithms for the construction of the package and their respec- tive pseudocodes are presented. Third, details of the SMR package functions are showed. Finally, illustrative examples of the package are presented.

[1]  Ronald F. Boisvert,et al.  NIST Handbook of Mathematical Functions , 2010 .

[2]  R. E. Lund,et al.  Algorithm AS 190: Probabilities and Upper Quantiles for the Studentized Range , 1983 .

[3]  F. N. David,et al.  Principles and procedures of statistics. , 1961 .

[4]  Greg Miller Numerical Analysis for Engineers and Scientists: Preface , 2014 .

[5]  Philip Rabinowitz,et al.  Methods of Numerical Integration , 1985 .

[6]  Shayle R. Searle,et al.  Linear Models for Unbalanced Data. , 1990 .

[7]  Nico M. Temme,et al.  Numerical methods for special functions , 2007 .

[8]  James H. Torrie,et al.  Principles and procedures of statistics: a biometrical approach (2nd ed) , 1980 .

[9]  Alfio Quarteroni,et al.  Numerical Mathematics (Texts in Applied Mathematics) , 2006 .

[10]  M. Molina Arias,et al.  El problema de las comparaciones múltiples , 2014 .

[11]  J. Neher A problem of multiple comparisons , 2011 .

[12]  F. B. Hildebrand,et al.  Introduction To Numerical Analysis , 1957 .

[13]  T. Chihara,et al.  An Introduction to Orthogonal Polynomials , 1979 .

[14]  Herbert A. David,et al.  Order Statistics, Third Edition , 2003, Wiley Series in Probability and Statistics.

[15]  E. Gumbel,et al.  Statistics of extremes , 1960 .

[16]  Mahendra Verma,et al.  DixonTest.CriticalValues: A Computer Code to Calculate Critical Values for the Dixon Statistical Data Treatment Approach , 2014 .

[17]  Margaret Diponzio Copenhaver,et al.  Computation of the distribution of the maximum studentized range statistic with application to multiple significance testing of simple effects , 1988 .

[18]  On the Distributions of Midrange and Semi-Range in Samples from a Normal Population , 1950 .

[19]  P. R. Rider,et al.  The Midrange of a Sample as an Estimator of the Population Midrange , 1957 .

[20]  D. Newman,et al.  THE DISTRIBUTION OF RANGE IN SAMPLES FROM A NORMAL POPULATION, EXPRESSED IN TERMS OF AN INDEPENDENT ESTIMATE OF STANDARD DEVIATION , 1939 .

[21]  J. Stoer,et al.  Introduction to Numerical Analysis , 2002 .

[22]  George C. McBane,et al.  Programs to Compute Distribution Functions and Critical Values for Extreme Value Ratios for Outlier Detection , 2006 .