Package mhde. October 23, 2015

Similar documents
Package datasets.load

Package robustreg. R topics documented: April 27, Version Date Title Robust Regression Functions

Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Package vinereg. August 10, 2018

Package strat. November 23, 2016

Package gtrendsr. October 19, 2017

Package pwrab. R topics documented: June 6, Type Package Title Power Analysis for AB Testing Version 0.1.0

Package bisect. April 16, 2018

Package gridgraphics

Package pnmtrem. February 20, Index 9

Package fastdummies. January 8, 2018

Package ECctmc. May 1, 2018

Package kdevine. May 19, 2017

Package SSLASSO. August 28, 2018

Package treedater. R topics documented: May 4, Type Package

Package DCD. September 12, 2017

Package clipr. June 23, 2018

Package kirby21.base

Package mdftracks. February 6, 2017

Package Density.T.HoldOut

Package ccapp. March 7, 2016

Package sfadv. June 19, 2017

Package TestDataImputation

Package sbf. R topics documented: February 20, Type Package Title Smooth Backfitting Version Date Author A. Arcagni, L.

Package libstabler. June 1, 2017

Package rmi. R topics documented: August 2, Title Mutual Information Estimators Version Author Isaac Michaud [cre, aut]

Package BibPlots. January 23, 2018

Package subplex. April 5, 2018

Package raker. October 10, 2017

Package DCEM. September 30, 2018

Package hyphenatr. August 29, 2016

Package CvM2SL2Test. February 15, 2013

Package birtr. October 4, 2017

Package gtrendsr. August 4, 2018

Package estprod. May 2, 2018

Package Combine. R topics documented: September 4, Type Package Title Game-Theoretic Probability Combination Version 1.

Package oec. R topics documented: May 11, Type Package

Package gggenes. R topics documented: November 7, Title Draw Gene Arrow Maps in 'ggplot2' Version 0.3.2

Package edci. May 16, 2018

Package ldbod. May 26, 2017

Package pomdp. January 3, 2019

Package ADMM. May 29, 2018

Package kdetrees. February 20, 2015

Package sfc. August 29, 2016

Package librarian. R topics documented:

Package RODBCext. July 31, 2017

Package DRaWR. February 5, 2016

Package sglr. February 20, 2015

Package statip. July 31, 2018

Package geogrid. August 19, 2018

Package robets. March 6, Type Package

Package SPIn. R topics documented: February 19, Type Package

Package Numero. November 24, 2018

Package ipft. January 4, 2018

Package gsscopu. R topics documented: July 2, Version Date

Package weco. May 4, 2018

Package ConvergenceClubs

Package ssmn. R topics documented: August 9, Type Package. Title Skew Scale Mixtures of Normal Distributions. Version 1.1.

Package SEMrushR. November 3, 2018

Package ecoseries. R topics documented: September 27, 2017

Package longclust. March 18, 2018

Package deductive. June 2, 2017

Package CuCubes. December 9, 2016

Package mixphm. July 23, 2015

Package pairsd3. R topics documented: August 29, Title D3 Scatterplot Matrices Version 0.1.0

Package websearchr. R topics documented: October 23, 2018

Package splithalf. March 17, 2018

Package sure. September 19, 2017

Package DBKGrad. R topics documented: December 2, 2018

Package nprotreg. October 14, 2018

Package lga. R topics documented: February 20, 2015

Package validara. October 19, 2017

Package MeanShift. R topics documented: August 29, 2016

Package anesrake. April 28, 2018

Package ANOVAreplication

Package OLScurve. August 29, 2016

Package KRMM. R topics documented: June 3, Type Package Title Kernel Ridge Mixed Model Version 1.0 Author Laval Jacquin [aut, cre]

Package wrswor. R topics documented: February 2, Type Package

Package QCAtools. January 3, 2017

Package fusionclust. September 19, 2017

Package mixsqp. November 14, 2018

Package spark. July 21, 2017

Package EM.Fuzzy. August 16, 2018

Package benchden. February 19, 2015

Package basictrendline

Package gibbs.met. February 19, 2015

Package pminer. February 7, 2017

Package glinternet. June 15, 2018

Package ezsummary. August 29, 2016

Package grec. R topics documented: August 13, Type Package

Package jstree. October 24, 2017

Package ggimage. R topics documented: December 5, Title Use Image in 'ggplot2' Version 0.1.0

Package SAENET. June 4, 2015

Package CALIBERrfimpute

Package StVAR. February 11, 2017

Package palmtree. January 16, 2018

Package bigreadr. R topics documented: August 13, Version Date Title Read Large Text Files

Package ClusterBootstrap

Package npphen. August 31, 2017

Package fitur. March 11, 2018

Transcription:

Package mhde October 23, 2015 Type Package Title Minimum Hellinger Distance Test for Normality Version 1.0-1 Date 2015-10-21 Author Paul W. Eslinger [aut, cre], Heather Orr [aut, ctb] Maintainer Paul W. Eslinger <paul.w.eslinger@pnnl.gov> Implementation of a goodness-of-fit test for normality using the Minimum Hellinger Distance. License GPL-2 GPL-3 LazyData TRUE URL ``https://cran.r-project.org/package=mhde Imports graphics, stats NeedsCompilation no Repository CRAN Date/Publication 2015-10-23 08:50:31 R topics documented: mhde.cn........................................... 2 mhde.crit.......................................... 2 mhde.plot.......................................... 3 mhde.test.......................................... 3 Index 6 1

2 mhde.crit mhde.cn Utility function for retrieving c_n value for any sample size This function evaluates the c n bandwidth value for the Epanechnikov kernel based on the sample size. mhde.cn(nsize) Nsize Number of values in the sample data set Value The Epanechnikov kernel bandwidth parameter for the sample size. mhde.crit Utility function for retrieving the critical value for any sample size and desired α level This function calculates the critical value for the minimized Hellinger distance for a given sample size and probability level for a goodness of fit test for normality. P values below 0.0001 return the value for p=0.0001 P values above 0.9999 return the value for p=0.9999 This utility function is not used by the other functions. It is provided as a "curiosity" for users. mhde.crit(nsize, Plevel = 0.95) Nsize Plevel The sample size is defined using Nsize. No default value is set. The probability level associated with the critical value is set using Plevel. The default value is 0.95. The α level of the test is 1-Plevel. Value pval Critical value for the minimized Hellinger distance

mhde.plot 3 Examples ## example using default alpha level of.05 mhde.crit(45) ## example using alpha level of.01 mhde.crit(45, 0.99) mhde.plot Plot the non-parametric and normal densities Simple plot function to display the data-based kernel density and the normal density for the final location and scale estimates. mhde.plot(listout) ListOut The output list from mhde.test. The argument Small for mhde.test must have the value FALSE. mhde.test Minimum Hellinger Distance Test for Normality This function fits a normal distribution to a data set using a mimimum Hellinger distance approach and then performs a test of hypothesis that the data are from a normal distribution. mhde.test(datavec, NGauss = 100, MaxIter = 25, InitLocation, InitScale, EpsLoc = 1e-04, EpsSca = 1e-04, Silent = FALSE, Small = FALSE) DataVec NGauss The data are supplied by the user in a numeric vector. The length of the vector determines the number of data values. The number of subintervals for the Gauss-Legendre integration techniques is controlled by NGauss. A default value of 100 is used. A minimum of 25 is enforced.

4 mhde.test Details Value MaxIter InitLocation InitScale EpsLoc EpsSca The maximum number of iterations that can occur in evaluating the minimum Hellinger distance is controlled by MaxIter. A default of 25 is used. A minimum of 1 is enforced. An optional initial location estimate can be defined using InitLocation. The data median is the default value. An optional initial scale estimate can be defined using InitScale. The data median absolute deviation is the default value. The epsilon (in data units) below which the iterative minimization approach declares convergence in the location estimate is controlled by EpsLoc. EpsLoc should be set to give approximately 5 digits of accuracy in the location estimate. A default value of 0.0001 is used. The epsilon (in data units) below which the iterative minimization approach declares convergence in the SCALE estimate is controlled by EpsSca. EpsSca should be set to give approximately 5 digits of accuracy in the scale estimate. A default value of 0.0001 is used. Silent A value of FALSE for Silent writes several results to the R console. Use Silent=TRUE to eliminate the output. Small A value of FALSE for Small returns a list of 11 objects. Use Small=TRUE to return a shorter list containing only the Hellinger distance and the p-value. Let f(x) and g(x) be absolutely continuous probability density functions. The square of the Hellinger distance can be written as H 2 = 1 f(x)g(x)dx. For this package, f(x) denotes the family of normal densities and g is a data-based density obtained by using the Ephanechnikov kernel. The kernel has the form w(z) = 0.75(1 z 2 ) for -1<z<1 and 0 elsewhere. Let the n sample data be denoted by x 1,..., x n. The data-based kernel density at any point y is calculated from g n (y) = 1 ns n c n n i=1 w( y x i s n c n ) A Newton-Rhapson method with analytical derivatives is to determine the minimum Hellinger distance. Numerical integration is done using a 6-point composite Gauss-Legendre technique. Values returned in a list include the following items: Minimized Hellinger distance p-value for the minimized distance Initial location used in the iterative solution Initial scale used in the iterative solution Final location estimate Final scale estimate Sample size

mhde.test 5 Author(s) Kernel density bandwidth parameter Vector of x values used in the integration for the Hellinger distance Vector of nonparametric density values at the x values used in the integration Vector of normal density values for the estimated location and scale at the x values used in integration Paul W. Eslinger and Heather M. Orr References Epanechnikov, VA. 1969. "Non-Parametric Estimation of a Multivariate Probability Density." Theory of Probability and its Applications 14(1):153-156. doi http://dx.doi.org/10.1137/ 1114019 Hellinger, E. 1909. "Neue Begrundung Der Theorie Quadratischer Formen Von Unendlichvielen Veranderlichen." Journal fur die reine und angewandte Mathematik 136:210-271. doi http://dx. doi.org/10.1515/crll.1909.136.210 Examples ## example with a normal data set mhde.test(rnorm(20,0.0,1.0),small=true) ## example with a uniform data set including example plot MyList <- mhde.test(runif(25,min=2,max=4)) mhde.plot(mylist)

Index mhde.cn, 2 mhde.crit, 2 mhde.plot, 3 mhde.test, 3 6