Bookmark and Share

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]

st: RE: fit chi distribution to continuos variable


From   "Feiveson, Alan H. (JSC-SK311)" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: fit chi distribution to continuos variable
Date   Thu, 1 Sep 2011 12:04:53 -0500

Andreas - By a "chi" distribution. do you mean your data are distributed as the square root of a chi-squared random variable? If so , you can just square your values and fit to a gamma or chi-squared distribution using -gammafit- as discussed in the last few days on this list.

To generate random values after you get the gamma or chi-squared parameters, just use -rgamma_ and take the square root.


Al Feiveson

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Andreas Fagereng
Sent: Thursday, September 01, 2011 11:56 AM
To: [email protected]
Subject: st: fit chi distribution to continuos variable

Dear Listers,

I have a continuos variable, that plotted as a histogram looks
something like a chi-distribution.

Is there a way to get stata to fit such a distribution to my data,
e.g. so that i can draw new numbers from distribution later?


Best
Andreas
*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index