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]

Re: st: Fit chi2 as in gammafit


From   Maarten Buis <[email protected]>
To   [email protected]
Subject   Re: st: Fit chi2 as in gammafit
Date   Tue, 30 Aug 2011 21:53:07 +0200

Acutually you can use -gammafit- to estimate a chi square distribution
by constraining [beta]_b[_cons] to be 2. The estimated degrees of
freedom are than 2*[alpha]_b[_cons]:

*------------ begin example -------------
drop _all
set obs  100
gen chi2 = rchi2(3)
constraint 1 [beta]_b[_cons]=2
gammafit chi2, constraint(1)

// display estimated degrees of freedom:
lincom [alpha]_b[_cons]*2
*------------- end example ---------------
(For more on examples I sent to the Statalist see:
http://www.maartenbuis.nl/example_faq )

Hope this helps,
Maarten

On Tue, Aug 30, 2011 at 8:43 PM, Nick Cox <[email protected]> wrote:
> -gammafit- (SSC) is also to be attributed to Stephen Jenkins.
>
> I think the short answer is that nothing is canned and public, but
> existing code like -gammafit- would get you most of the way. Fitting a
> more general distribution has the merit that it tells you something of
> what ways the distribution departs from the specific case.
>
> See also official -pchi- and -qchi-.
>
> Nick
>
> On Tue, Aug 30, 2011 at 7:30 PM, Laurie Molina <[email protected]> wrote:
>> Hi,
>> I would like to fit a chi2 probability distribution to my data, in the
>> same way as the gammafit command (by Nick Cox) does it.
>> Is there any way to perform such a task?
>>
>> Thank you all in advance,
>>
>> LM
>> *
>> *   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/
>



-- 
--------------------------
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/


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