Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Feiveson, Alan H. (JSC-SK311)" <alan.h.feiveson@nasa.gov> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
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: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Andreas Fagereng Sent: Thursday, September 01, 2011 11:56 AM To: statalist@hsphsun2.harvard.edu 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/