[R] error with polr()

Chaehyung Ahn cahn at email.unc.edu
Tue Mar 22 02:43:40 CET 2005


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




More information about the R-help mailing list