Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: ologit maximum-likelihood


From   Richard Gates <rgates@stata.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: ologit maximum-likelihood
Date   Mon, 02 Feb 2004 14:13:54 -0600

Given a vector of covariates x and unknown parameters b, the odds for
the event y <= j  is k_j*exp(-x'b), j=1,..,m. That is, the odds of 
observing y less than or equal to category j is proportional to
exp(-x'b). The reported cut points from Stata are cut_j = log(k_j).
Using the notation of the Reference Manual we have odds(j) =
exp(cut_j-x'b). Given x, the ratio of odds y<=j and y<=i is then
odds(j)/odds(i) = k_j/k_i which is independent of x. I believe this 
addresses the question about the Reference Manual.

On calculating the likelihood, McCullagh (1980) has a formulation that
uses P(Y < j) = invlogit(cut_j + x'b), j=1,..m.

Another approach I can do by example

. ologit rep78 foreign

Iteration 0:   log likelihood = -93.692061
Iteration 1:   log likelihood = -79.696089
Iteration 2:   log likelihood = -79.044933
Iteration 3:   log likelihood = -79.029267
Iteration 4:   log likelihood = -79.029243

Ordered logit estimates                           Number of obs  
=         69
                                                  LR chi2(1)      =     
29.33
                                                  Prob > chi2     =    
0.0000
Log likelihood = -79.029243                       Pseudo R2       =    
0.1565

------------------------------------------------------------------------------
       rep78 |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+----------------------------------------------------------------
     foreign |    2.98155   .6203637     4.81   0.000      1.76566   
4.197441
-------------+----------------------------------------------------------------
       _cut1 |  -3.158382   .7224269          (Ancillary parameters)
       _cut2 |  -1.362642   .3557343 
       _cut3 |   1.232161   .3431227 
       _cut4 |   3.246209   .5556646 
------------------------------------------------------------------------------

For domestic (foreign = 0) cars we have
. scalar P1 = invlogit(_b[_cut1])

. scalar P2 = invlogit(_b[_cut2])

. scalar P3 = invlogit(_b[_cut3])

. scalar P4 = invlogit(_b[_cut4])

. di "poor " P1 " fair " P2-P1 " average " P3-P2 " good " P4-P3
"excellent " 1-P4
poor .04076226 fair .16304903 average .57038536 good .18834001 excellent
.03746334

For foreign cars we have 

. scalar P1 = invlogit(_b[_cut1]-_b[foreign])

. scalar P2 = invlogit(_b[_cut2]-_b[foreign])

. scalar P3 = invlogit(_b[_cut3]-_b[foreign])

. scalar P4 = invlogit(_b[_cut4]-_b[foreign])

. di "poor " P1 " fair " P2-P1 " average " P3-P2 " good " P4-P3 "
excellent " 1-P4
poor .00215043 fair .01066519 average .13530867 good .41765691 excellent
.4342188

Or 
. predict poor fair average good excellent
(option p assumed; predicted probabilities)

. table foreign, c(mean poor mean fair mean average mean good mean
excellent) 

--------------------------------------------------------------------------------
 Car type |   mean(poor)    mean(fair)  mean(aver~e)    mean(good) 
mean(exce~t)
----------+---------------------------------------------------------------------
 Domestic |     .0407623       .163049      .5703853        .18834     
.0374633
  Foreign |     .0021504      .0106652      .1353087      .4176569     
.4342188
--------------------------------------------------------------------------------


I hope this helps.

McCullagh (1980) Regression models for ordinal data. JRSS B. 42 109-142



-Rich
rgates@stata.com

On Sun, 2004-02-01 at 16:35, Jose Maria wrote:
> Dear Stata people:
> I am at loss to understand better the output of the command -ologit-:
> 1. is it possible to show me, numerically, using the example of page 475-476 of version6 manual, the property given in the third paragraph of Methods and Formulas, on page 479: odds(k)= P(Y<=k)/ P((Y>k) for odds (k1) and odds(k2)?
> 2. how can I construct the likelihood function to obtain the ki (_cut1, _cut2, _cut3 etc)?
> I am not sure whether these are statistical or Stata questions, but I thank any guidance.
> Cheers,
> Jose Maria
>  
> Jose Maria Pacheco de Souza, Professor Titular
> Departamento de Epidemiologia
> Faculdade de Saude Publica/Universidade de Sao Paulo
> Av. Dr. Arnaldo, 715	cep 01246-904
> Sao Paulo	Brasil
> fones (11)3082-3886  (11)3714-2403  (11)3768-8612
> fax   (11)3082-2920  (11)3714-2403
> www.fsp.usp.br/~jmpsouza
> jmpsouza@usp.br
>  
> 
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index