Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: How to test whether data follows Exp distribution?
From
Antoine Terracol <[email protected]>
To
[email protected]
Subject
Re: st: How to test whether data follows Exp distribution?
Date
Wed, 07 Jul 2010 21:00:56 +0200
In fact, if Y is exponential(lambda), then exp(-lambda*Y) is uniform(0,1)
In any case, if Y is exponential, then its cumulative hazard rate would
be linear irrespective of lambda, and, as Nick said, exp(-lambda*Y)
would have a linear quantile plot, but one would need to know the value
of lambda
clear
set obs 1000
scalar lambda=2
g var=-ln(runiform())/lambda // var~E(lambda)
stset var
sts graph, cumhaz
g var2=exp(-var*lambda)
quantile var2
aNTOINE
On 07/07/2010 20:42, [email protected] wrote:
I could also be wrong, but if Y is exponential, then wouldn't log(Y) be linear?
reg jordan
-----Original Message-----
From: "Lachenbruch, Peter"<[email protected]>
Sent: Jul 7, 2010 2:01 PM
To: "'[email protected]'"<[email protected]>
Subject: RE: st: How to test whether data follows Exp distribution?
If I recall my basic math stat, log(Y) should be uniform if Y is exponential. So you could check it that way. A very simple idea would be to bin the logs and do a chi-squared gof test.
Tony
Peter A. Lachenbruch
Department of Public Health
Oregon State University
Corvallis, OR 97330
Phone: 541-737-3832
FAX: 541-737-4001
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Maarten buis
Sent: Tuesday, July 06, 2010 11:39 PM
To: [email protected]
Subject: Re: st: How to test whether data follows Exp distribution?
--- On Wed, 7/7/10, Jabr, Wael M wrote:
I am trying to find if the variable I
have follows an exponential distribution.
You can use -hangroot- to check an empirical
distribution against, among others, an
exponential distribution. To install it type
in Stata -ssc install hangroot-.
Hope this helps,
Maarten
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/