Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: test for unimodality


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: test for unimodality
Date   Thu, 20 Mar 2008 13:47:45 -0000

I assume an interest in continuous variables here. 

If such Stata programs exist, 

. findit mode

or 

. findit modality 

or 

. findit unimodal

should find them. However, in practice "mode" as search text catches too
much 
(think about it) and the others miss stuff with some relevance. 

Searches aside, I don't think anyone has implemented the dip test you
refer to in Stata.
As it comes from a bimodal husband-wife collaboration, the name perhaps
should be
Hartigan-Hartigan dip test, but that does not seem to have caught on.
Some of my less 
statistical colleagues would sniff out the hegemony of patriarchy there,
although which 
Hartigan is being overlooked is not clear. 

-hsmode- from SSC and -shorth- from SSC are in neighbouring territory.
Kit Baum 
recently and kindly drew my attention to this work on "shorth plots"

http://ideas.repec.org/p/dgr/kubcen/200824.html

It is my intention to write a Stata program for those. 

Otherwise: 

1. If you suspect that data might not be unimodal because of a mix of
different and known groups, 
then testing for that directly is possible using various comparisons of
location parameters 
across groups. 

2. As many people have argued, the absence of unimodality should make
itself evident by 
showing up consistently in kernel density estimates obtained with rather
different bandwidths. 
Simply, if I see two modes again and again and there is a story to
support, I don't miss not 
having a P-value from some test. 

That may not be much help if you are desperate for a P-value. 

Nick
[email protected] 

Fabian Slonimczyk

I need to test whether the distribution of my data is unimodal. I
found a test (Hartigan's dip test) on line but it has been programmed
for R or matlab only. Do you know whether this or other tests have
been developed for STATA? Thanks

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index