[R] error with polr()

From: Chaehyung Ahn <cahn_at_email.unc.edu>
Date: Tue 22 Mar 2005 - 12:43:40 EST


Dear Sir,

I get an error message when I use polr() in MASS package.

My data is "ord.dat". I made "y" a factor.

   y y1 y2 x lx

1  0  0  0 3.2e-02 -1.49485
2  0  0  0 3.2e-02 -1.49485
3  0  0  0 1.0e-01 -1.00000
4  0  0  0 1.0e-01 -1.00000
5  0  0  0 3.2e-01 -0.49485
6  0  0  0 3.2e-01 -0.49485
7  1  1  0 1.0e+00  0.00000
8  0  0  0 1.0e+00  0.00000
9  1  1  0 3.2e+00  0.50515
10 1  1  0 3.2e+00  0.50515
11 0  0  0 1.0e+01  1.00000
12 1  1  0 1.0e+01  1.00000
13 1  1  0 3.2e+01  1.50515
14 2  1  1 3.2e+01  1.50515
15 2  1  1 1.0e+02  2.00000
16 1  1  0 1.0e+02  2.00000
17 2  1  1 3.2e+02  2.50515
18 1  1  0 3.2e+02  2.50515
19 2  1  1 1.0e+03  3.00000
20 2  1  1 1.0e+03  3.00000

When I try,
> polr(y~lx,data=ord.dat)

I gives me a output, which is the same as that from SAS.

But when I try,
> summary(polr(y~lx,data=ord.dat))

Re-fitting to get Hessian

Error in optim(start, fmin, gmin, method = "BFGS", hessian = Hess, ...) :

        initial value in vmmin is not finite

And the weird thing is that it's fine if I use "x" instead of "lx", where lx=log10(x).

thanks

Sincerely,

cahn



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Mar 22 12:49:10 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:52 EST