search for: polr

Displaying 20 results from an estimated 196 matches for "polr".

Did you mean: poll
2004 Mar 03
7
Location of polr function
Hello I am running R 1.8.1 on a Windows platform I am attempting to fit an ordinal logistic regression model, using the polr function, as described in Venables and Ripley. But when I try model4 <- polr(ypsxcat~committed + as.factor(sex) + as.factor(drugusey) + anycsw + as.factor(sex)*committed + as.factor(sex)*as.factor(drugusey)+as.factor(sex)*anycsw, data = duhray) I get a message that the polr function was no...
2007 Feb 19
3
summary polr
Hi all, I have a problem to estimate Std. Error and t-value by ?polr? in library Mass. They result from the summary of a polr object. I can obtain them working in the R environment with the following statements: temp <- polr(formula = formula1, data = data1) coeff <- summary(temp), but when the above statements are enclosed in a function, summary...
2009 Jan 13
1
deviance in polr method
...,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) x2 = c(0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) x3 = c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0) # catgeory 4 is used as baseline ord.rp = ordered(p) fit0.polr = polr(ord.rp ~ 1, weights=y) fit1.polr = polr(ord.rp ~ x1 + x2+x3, weights=y) summary(fit1.polr) anova(fit0.polr,fit1.polr) This works and "summary" gives the correct parameter estimates but I have a problem with the deviance. Anova gives Likelihood ratio tests o...
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...
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:...
2010 Nov 03
2
bugs and misfeatures in polr(MASS).... fixed!
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...
2012 Jul 09
3
Package 'MASS' (polr): Error in svd(X) : infinite or missing values in 'x'
Hello, I am trying to run an ordinal logistic regression (polr) using the package 'MASS'. I have successfully run other regression classes (glm, multinom) without much problem, but with the 'polr' class I get the following error: " Error in svd(X) : infinite or missing values in 'x' " which appears when I run the "summar...
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 leve...
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)) Coefficie...
2011 Mar 01
1
How to understand output from R's polr function (ordered logistic regression)?
I am new to R, ordered logistic regression, and polr. The "Examples" section at the bottom of the help page for polr<http://stat.ethz.ch/R-manual/R-patched/library/MASS/html/polr.html>(that fits a logistic or probit regression model to an ordered factor response) shows options(contrasts = c("contr.treatment", "contr.p...
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() a...
2002 Jun 04
2
machine dependency [polr()/optim()]
Dear R experts: I am running some calculations using polr() in MASS library, and found some differences in results obtained on two different machines (IRIX 6.5, and Linux RH 7.1). It is not clear to me whether this is due to some error in my programming the calculation and how to resolve the differences, if possible. The polr() call is the following: r...
2008 Jan 05
1
Likelihood ratio test for proportional odds logistic regression
Hi, I want to do a global likelihood ratio test for the proportional odds logistic regression model and am unsure how to go about it. I am using the polr() function in library(MASS). 1. Is the p-value from the likelihood ratio test obtained by anova(fit1,fit2), where fit1 is the polr model with only the intercept and fit2 is the full polr model (refer to example below)? So in the case of the example below, the p-value would be 1. 2. For the model...
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...
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 exa...
2007 Jun 04
2
How to obtain coefficient standard error from the result of polr?
Hi - I am using polr. I can get a result from polr fit by calling result.plr <- polr(formula, data=mydata, method="probit"); However, from the 'result.plr', how can I access standard error of the estimated coefficients as well as the t statistics for each one of them? What I would like to do ult...
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 i...
2000 Mar 11
1
polr question
Dear friends. Do Polr in Mass change the sign of the coefficients ? Example (McCullagh 1980) options(contrasts=c("contr.treatment","contr.poly")) library(Mass) freq <- c(19,29,24,497,560,269) yy <- ordered(gl(3,1,6)) z4 <- polr(yy~x,weights=freq) > z4 Call: polr(formula = yy ~ x, weights...
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 = acipenser_gueldenstaed...
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