Displaying 20 results from an estimated 500 matches similar to: "newbie polr() question"
2003 Dec 08
2
R^2 analogue in polr() and prerequisites for polr()
Hi
(1)In polr(), is there any way to calculate a pseudo analogue to the
R^2. Just for use as a purely descriptive statistic of the goodness of
fit?
(2) And: what are the assumptions which must be fulfilled, so that the
results of polr() (t-values, etc.) are valid? How can I test these
prerequisites most easily: I have a three-level (ordered factor)
response and four metric variables.
many
2002 Feb 07
1
newbie question: polr and glm.control
I'm running polr() and getting warning messages from glm.fit(). It seems
reasonable to use glm.control() to turn on the trace and follow what
glm.fit() does when called by polr(); or is it?
glm.control(maxit=10, trace=TRUE)
polr(act~., data=mm)
The glm.control() sets the trace TRUE, but there's no change in the output
from polr().
Many thanks in advance for any help/pointers.
2010 Sep 06
3
likelyhood maximization problem with polr
Dear community,
I am currently trying to fit an ordinal logistic regression model with the
polr function. I often get the same error message :
"attempt to find suitable starting values failed", for example with :
require(MASS)
data(iris)
polr(Species~Sepal.Length+Sepal.Width+Petal.Length+Petal.Width,iris)
(I know the response variable Species should be nominal but I do as levels
2007 Nov 10
1
polr() error message wrt optim() and vmmin
Hi,
I'm getting an error message using polr():
Error in optim(start, fmin, gmin, method = "BFGS", hessian = Hess, ...) :
initial value in 'vmmin' is not finite
The outcome variable is ordinal and factored, and the independant variable
is continuous. I've checked the source code for both polr() and optim()
and can't find any variable called
2007 Feb 20
0
R: Re: summary polr
Hi all,
The problem is that when you try to use the function summary of a polr object in a function, it does not work.
The problem is not related to the formula or the structure of data involved.
It is probably related to the use of the function "vcov" in the code of summary for polr, and the iterative procedure to estimate the Hessian.
Anyway, here there is an example extracted from
2007 Jun 11
1
How do I obtain standard error of each estimated coefficients in polr
Hi,
I obtained all the coefficients that I need from polr. However, I'm wondering how I can obtain the standard error of each estimated coefficient? I saved the Hessian and do something like summary(polrObj), I don't see any standard error like when doing regression using lm. Any help would be really appreciated. Thank you!
- adschai
2007 Jul 25
0
Function polr and discrete ordinal scale
Dear all,
To modelize the abundance of fish (4 classes) with a set of environmental variables, I used the polr and predict.polr functions. I would like to know how to bring the cumulated probabilities back to a discrete ordinal scale.
For the moment I used the predict.polr function with the argument "class". Is there an other way?
polrf <- polrf <- polr_mod(formula =
2005 Mar 22
1
error with polr()
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
2009 Feb 24
1
polr (MASS): score test for proportional odds model
For the following model,
library(vcd)
arth.polr <- polr(Improved ~ Sex + Treatment + Age, data=Arthritis)
summary(arth.polr)
where Improved is an ordered, 3-level response I'm looking for a
*simple* way to test
the validity of the proportional odds assumption, typically done via a
score test
for equal slopes/effects over the predictors.
I do find a po.test= option in the repolr package
2003 Feb 25
1
summary(polr.object)
Dear all,
I have used polr in MASS but I am uncertain about the summary(polr.object)
interpretation and would be happy for help on that. This is my summary:
> summary(shade.polr)
Re-fitting to get Hessian
Call:
polr(formula = as.ordered(shade) ~ as.factor(objekt), data = sof,
weights = as.numeric(frek))
Coefficients:
Value Std. Error t value
2.1699520 0.3681840 5.8936612
2006 Jul 19
1
Problem with ordered logistic regression using polr function.
Hi,
I'm trying to fit a ordered logistic regression. The response variable
(y) has three levels (0,1,2).
The command I've used is:
/ordlog<-polr(y~x1+x2+x3+x4, data=finalbase, subset=heard, weight=wt,
na.action=na.omit)
/
(There are no NA's in y but there are NA's in X's)
The error I'm getting is:
/Warning messages:
1: non-integer #successes in a binomial glm! in:
2004 Oct 28
1
polr versus multinom
Hi,
I am searching for methods to compare regression models with an ordered
categorical response variable (polr versus multinom).
The pattern of predictions of both methods (using the same predictor
variables) is quite different and the AIC is smaller for the multinom
approach. I guess polr has more strict premises for the structure of the
response variable, which methods can be used to test for
2005 Nov 12
0
Error message in polr
Dear members of the list,
I'm fitting ordinal regressions using polr, and in some models I
get the error copied below. Dependent variable is an ordered factor
of bird abundance categories, and predictors are continuous habitat
variables.
> ro6 <- polr(formula = abun ~ InOmbrot + Oliva.OC + ToCultAr +
DivCulArb + AltitMax + COORXY)
> summary(ro6)
Re-fitting to get Hessian
2006 Jan 24
1
polr (MASS)
Hello all,
I am trying to use polr (the ordered logistic model from MASS) but I am
getting the following error message:
Error in if (all(pr > 0)) -sum(wt * log(pr)) else Inf :
missing value where TRUE/FALSE needed
My response variable is a factor with 3 levels and I have 2 independent
variables. I am not sure if I guessed the starting parameters right, which
I imagine could be a source of
2006 Aug 17
1
Setting contrasts for polr() to get same result of SAS
Hi all,
I am trying to do a ordered probit regression using polr(), replicating a
result from SAS.
>polr(y ~ x, dat, method='probit')
suppose the model is y ~ x, where y is a factor with 3 levels and x is a
factor with 5 levels,
To get coefficients, SAS by default use the last level as reference, R by
default use the first level (correct me if I was wrong),
The result I got is a
2008 Sep 27
1
retrieving weights from a polr object
Dear list members,
The polr() function in the MASS package takes an optional weights argument
for case weights. Is there any way to retrieve the case weights from the
fitted "polr" object? Examining both the object and the code, I don't see
how this can be done, but perhaps I've missed something.
Any help would be appreciated.
John
------------------------------
John Fox,
2003 Dec 30
1
odd results from polr vs wilcoxon test
Dear R helpers,
I would like to ask why polr occasionally generates results that look very
odd.
I have been trying to compare the power of proportional odds logistic
regression with
the Wilcoxon test. I generated random samples, applied both tests and
extracted and
compared the p-values, thus:-
library(MASS)
c1=rep(NA,100); c2=c1
for (run in 1:100)
{
dat=c(rbinom(20,12,0.65),rbinom(20,12,0.35))
2005 Aug 12
1
Manually Calculating Odds from POLR Model
Hello,
I am using polr(...) to generate a model. The summary shows the
coefficients and the intercepts.
For example:
coefficient for x1 = c1
coefficient for x2 = c2
intercept A|B = i1
intercept B|C = i2
I can then run predict(..., type="p") with the model and see the odds for
each factor.
For example:
A B C
1 0.3 0.5 0.2
2 0.4
2004 Oct 08
1
polr and optim question
Hello again
I am trying to fit an ordinal logistic model using the polr function
from MASS. When I run
model.loan.ordinal <- polr(loancat~age + sex + racgp + yrseduc +
needlchg + gallery + sniffball + smokeball + sniffher +
smokeher + nicocaine + inject + poly(year.of.int,3) + druginj +
inj.years)
I get an error
Error in optim(start, fmin, gmin, method = "BFGS", hessian =
2006 May 03
1
Problem in using confint method on polr model object
I fit a proportional odds model
with the polr-function of the MASS package from
Venables and Ripley
Applying the confint method to calculate confidence intervals for the
parameters I get
the following error message
Waiting for profiling to be done...
Re-fitting to get Hessian
Error in X[, -i, drop = FALSE] : incorrect number of dimensions
Can someone explain the error-message?
(The