Economics at your fingertips  

M statistic commands: Interpoint distance distribution analysis

Pietro Tebaldi, Marco Bonetti () and Marcello Pagano ()
Additional contact information
Marco Bonetti: Bocconi University
Marcello Pagano: Harvard School of Public Health

Stata Journal, 2011, vol. 11, issue 2, 271-289

Abstract: We implement the commands mstat and mtest to perform inference based on the M statistic, a statistic that can be used to compare the interpoint distance distribution across groups of observations. The analyses are based on the study of the interpoint distances between n points in a k-dimensional setting to produce a one-dimensional real-valued test statistic. The locations are distributed in a region of the plane. When we consider all (n 2) interpoint distances, the dependencies among them are difficult to express 2 analytically, but their distribution is informative, and the M statistic can be built to summarize one aspect of this information. The two commands can be used on a wide class of datasets to test the null hypothesis that two groups have the same (spatial) distribution. mstat and mtest return the exact M test statistic. Moreover, mtest executes a Monte Carlo–type permutation test, which returns the empirical p-value together with its confidence interval. This is the command to use in most situations, because the convergence of M to its asymptotic chi-squared distribution is slow. Both commands can be used to obtain graphical output of the empirical density function of the interpoint distance distributions in the two groups and the two- dimensional map of the n observations in the plane. The descriptions of the commands are accompanied by examples of applications with real and simulated data. We run the test on the Alt and Vach grave site dataset (Manjourides and Pagano, forthcoming, Statistics in Medicine) and reject the null hypothesis, in contradiction to other published analyses. We also show how to adapt the techniques to discrete datasets with more than one unit in each location. Finally, we report an extensive application on breast cancer data in Massachusetts; in the application, we show the compatibility of the M commands with Pisati's spmap package. Copyright 2011 by StataCorp LP.

Keywords: mstat; mtest; M statistic; interpoint distance; Monte Carlo test; spmap (search for similar items in EconPapers)
Date: 2011
Note: to access software from within Stata, net describe
References: View references in EconPapers View complete reference list from CitEc
Citations: View citations in EconPapers (4) Track citations by RSS feed

Downloads: (external link) link to article purchase

Related works:
Journal Article: M statistic commands: Interpoint distance distribution analysis (2011) Downloads
Working Paper: M statistic commands: Interpoint distance distribution analysis (2010) Downloads
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link:

Ordering information: This journal article can be ordered from

Access Statistics for this article

Stata Journal is currently edited by H. Joseph Newton and Nicholas J. Cox

More articles in Stata Journal from StataCorp LP
Bibliographic data for series maintained by Christopher F. Baum ().

Page updated 2020-01-02
Handle: RePEc:tsj:stataj:v:11:y:2011:i:2:p:271-289