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: lrtest for nested model


From   Zenobia Hung <[email protected]>
To   [email protected]
Subject   Re: st: lrtest for nested model
Date   Thu, 24 Oct 2013 21:39:24 +0800

Thank you for your help!!!

2013/10/24 Maarten Buis <[email protected]>:
> On Thu, Oct 24, 2013 at 3:15 PM, Zenobia Hung wrote:
>> I am having a problem with nested model. In doing a logistic
>> regression, I want to store model1 and model2 to do a Likelihood ratio
>> test lrtest.
>>
>> Full model: logit y x1 x2 x3 x4 x5 x6
>>
>> If H0: b1=b2, then what is my nested model(restricted model)?
>
> *------------------ begin example ------------------
> sysuse nlsw88, clear
> logit union grade south
> est store full
>
> // method 1
> constraint 1 grade = south
> logit union grade south, constr(1)
> est store constr1
> lrtest full constr1
>
> // method 2
> gen grade_south = grade + south
> logit union grade_south
> est store constr2
> lrtest full constr2
> *------------------- end example -------------------
> * (For more on examples I sent to the Statalist see:
> * http://www.maartenbuis.nl/example_faq )
>
> Also see: M.L. Buis (2012) "Stata tip 108: On adding and
> constraining", The Stata Journal, 12(2), pp. 342-344.
>
> Hope this helps,
> Maarten
>
>
>
>
> ---------------------------------
> Maarten L. Buis
> WZB
> Reichpietschufer 50
> 10785 Berlin
> Germany
>
> http://www.maartenbuis.nl
> ---------------------------------
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/



-- 
長庚大學醫管所碩士班
洪姿鈺
0987096989
[email protected]

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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