Skip to content

Ordered logit or probit

5 messages · Kevin Karty, Chris Lawrence, Antonio Olinto +2 more

#
Has anyone written something that runs ordered logit or probit in R?  If
so, where might it be
Located...

Kevin
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Aug 30, Kevin Karty wrote:
Ordered logit models can be run using the polr() routine in the MASS
library.  Ordered probit requires a bit of source hacking; a cheesy,
undocumented retread of polr that does ordered probit instead is at
http://www.lordsutch.com/chris/oprobit.q; example use:

source("oprobit.q")
oprobit(as.ordered(impeach) ~ party + clinton_vote + marginality + ...)

In theory, ordered probit and ordered logit should give similar
results (although rescaled) for well-behaved data; however, if
something strange is going on in the tails (where the pdfs are
somewhat different), they can differ quite a bit.


Chris
#
Dear R-users,

I'm trying to solve the following equation:

F=25*(F+0.2)/22.2/(EXP(F+0.2)-1)

In Excel I found F=0.696176718 but I'd like to know how to use R to solve
it. I tried, without success, to use "solve".

Thanks a lot,

Antonio Olinto






-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
You could try using 'uniroot':
[1] 0.6959678

-roger
_______________________________
UCLA Department of Statistics
rpeng at stat.ucla.edu
http://www.stat.ucla.edu/~rpeng
On Fri, 30 Aug 2002, Antonio Olinto wrote:

            
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Fri, 30 Aug 2002, Antonio Olinto wrote:

            
Use uniroot()

R> uniroot(function(F) F-25*(F+0.2)/22.2/(exp(F+0.2)-1), c(0,10))
$root
[1] 0.695973

$f.root
[1] -9.561183e-06

$iter
[1] 4

$estim.prec
[1] 6.103516e-05


	-thomas

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._