Re: [R] bugs and misfeatures in polr(MASS).... fixed!

2014-08-12 Thread tjb
The official maintainers were dismissive when I suggested there were some problems I could fix with the then implementation of polr. I haven't looked at it since, sorry. On Tue, Aug 12, 2014 at 7:44 PM, Guido Biele [via R] < ml-node+s789695n4695392...@n4.nabble.com> wrote: > I modified (where ne

Re: [R] bugs and misfeatures in polr(MASS).... fixed!

2012-10-25 Thread tjb
This could well be out of date because I have not paid any attention to the official POLR code in a year or more. Attached is fixed-polr.R. cheers, Tim On Wed, Oct 24, 2012 at 10:38 PM, ahs [via R] < ml-node+s789695n4647311...@n4.nabble.com> wrote: > Great! > You can skip my question about s0 th

Re: [R] bugs and misfeatures in polr(MASS).... fixed!

2012-10-24 Thread ahs
Great! You can skip my question about s0 though, I found where it is being used, but I still struggle with the code and convergence problem. I also found something here http://biostat.mc.vanderbilt.edu/wiki/pub/Main/CharlesDupontStuff/newPolr.R that seems like someone tried to fix it, but with th

Re: [R] bugs and misfeatures in polr(MASS).... fixed!

2012-10-24 Thread tjb
Sorry, I have been away. I'll have a look at this and get back to you tomorrow. Tim On Thu, Oct 18, 2012 at 10:35 PM, ahs [via R] < ml-node+s789695n4646600...@n4.nabble.com> wrote: > Hello, > I am trying to use this fix for the convergence problem in polr, but I > don't seem to get the change of

Re: [R] bugs and misfeatures in polr(MASS).... fixed!

2012-10-18 Thread ahs
Hello, I am trying to use this fix for the convergence problem in polr, but I don't seem to get the change of code right. I redefine the function polr by the lines tjb wrote > if(missing(start)) { > # try something that should always work -tjb > u <- as.integer(table(y)) > u

Re: [R] bugs and misfeatures in polr(MASS).... fixed!

2010-11-06 Thread tjb
Note that that the enhancements in my original post solve the unresolved problem of Chaehyung Ahn (22 Mar 2005) whose data I reproduce: y,x,lx 0,3.2e-02,-1.49485 0,3.2e-02,-1.49485 0,1.0e-01,-1.0 0,1.0e-01,-1.0 0,3.2e-01,-0.49485 0,3.2e-01,-0.49485 1,1.0e+00,0.0 0,1.0e+00,0.0 1,3.

Re: [R] bugs and misfeatures in polr(MASS).... fixed!

2010-11-06 Thread tjb
The start value generation code in polr is also known to fail quite frequently. For example, against the Iris data as recently posted to this list by blackscorpio ( Sep 6, 2010). > polr(Species~Sepal_Length+Sepal_Width+Petal_Length+Petal_Width,data=iris) Error in polr(Species ~ Sepal_Length + Se

[R] bugs and misfeatures in polr(MASS).... fixed!

2010-11-02 Thread Mr Timothy James BENHAM
In polr.R the (several) functions gmin and fmin contain the code > theta <- beta[pc + 1L:q] > gamm <- c(-100, cumsum(c(theta[1L], exp(theta[-1L]))), 100) That's bad. There's no reason to suppose beta[pc+1L] is larger than -100 or that the cumulative sum is smaller than 100. For pr