similar to: newbie question: polr and glm.control

Displaying 20 results from an estimated 20000 matches similar to: "newbie question: polr and glm.control"

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:
2002 Jun 21
2
a question on statistics (rather than R-specific)
I have used plor() to model a rather large 3-category dataset (~1500 data points, ~15 independent variables); from the resulting model (with a deviance slightly below the residual degrees of freedom), the training data are placed in only the two extreme categories. Though the result appears to indicate that there's only a relative 'narrow' bin for the medium group, [and when the
2002 May 02
1
how to trap any warnings from an R function -- again :(
With the incorporation of the useful hints, my user function now looks like this: userfn <- function() { ... ow <- options("warn") options(warn = 2); ... reg<-try(polr(act~.,data=mm,Hess=TRUE)) ... sumreg<-try(summary(reg)) print(length(sumreg)) print(sumreg) ... options(ow) # reset } The routine userfn() is called multiple times, two of which I happen to know to
2011 Feb 16
1
error in optim, within polr(): "initial value in 'vmmin' is not finite"
Hi all. I'm just starting to explore ordinal multinomial regression. My dataset is 300,000 rows, with an outcome (ordinal factor from 1 to 9) and five independent variables (all continuous). My first stab at it was this: pomod <- polr(Npf ~ o_stddev + o_skewness + o_kurtosis + o_acl_1e + dispersal, rlc, Hess=TRUE) And that worked; I got a good model fit. However, a variety of other
2002 Apr 29
3
how to trap any warnings from an R function
Within an user function, how are the warnings from an R function be trapped (such that some proper actions can be taken)? 'last.warning' is returned only at the top level. Pointers are appreciated. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info",
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 = freq) Coefficients: x2 -0.6026492 Intercepts: 1|2
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))
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 "summary" command. The data file is
2004 Oct 09
2
polr problem solved
I'd like to thank John Fox and Chuck Cleland for their help in resovling this issue. It turned out to be something simple, but perhaps others have had similar problems In my original data frame, I had 4 categories of race/ethnicity. One of the categories (other) was very small, and not similar to any of the other three categories, so I created a new data frame deleting those people.
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 100. For practical datasets those assumptions are frequently violated, causing the
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:
2003 Jan 22
3
Error when using polr() in MASS
Dear all, I get an error message when I use polr() in MASS. These are my data: skugg grupp frekv 4 1 gr3 0 5 2 gr3 3 6 3 gr3 6 10 1 gr5 1 11 2 gr5 12 12 3 gr5 1 > > summary(polr(skugg ~ grupp, weights=frekv, data= skugg.cpy1.dat)) Error in optim(start, fmin, gmin, method = "BFGS", hessian = Hess, ...) :
2012 Apr 24
1
nobs.glm
Hi all, The nobs method of (MASS:::polr class) takes into account of weight, but nobs method of glm does not. I wonder what is the rationale of such design behind nobs.glm. Thanks in advance. Best Regards. > library(MASS) > house.plr <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing) > house.logit <- glm(I(Sat=='High') ~ Infl + Type + Cont, binomial,weights
2010 Jul 23
2
glm - prediction of a factor with several levels
Dear community, I'm currently attempting to predict the occurence of an event (factor) having more than 2 levels with several continuous predictors. The model being ordinal, I was waiting the glm function to return several intercepts, which is not the case when looking to my results (I only have one intercept). I finally managed to perform an ordinal polytomous logisitc regression with the
2008 Jun 30
2
difference between MASS::polr() and Design::lrm()
Dear all, It appears that MASS::polr() and Design::lrm() return the same point estimates but different st.errs when fitting proportional odds models, grade<-c(4,4,2,4,3,2,3,1,3,3,2,2,3,3,2,4,2,4,5,2,1,4,1,2,5,3,4,2,2,1) score<-c(525,533,545,582,581,576,572,609,559,543,576,525,574,582,574,471,595, 557,557,584,599,517,649,584,463,591,488,563,553,549) library(MASS) library(Design)
2008 Sep 30
2
weird behavior of drop1() for polr models (MASS)
I would like to do a SS type III analysis on a proportional odds logistic regression model. I use drop1(), but dropterm() shows the same behaviour. It works as expected for regular main effects models, however when the model includes an interaction effect it seems to have problems with matching the parameters to the predictor terms. An example: library("MASS"); options(contrasts =
2009 Jan 13
1
deviance in polr method
Dear all, I've replicated the cheese tasting example on p175 of GLM's by McCullagh and Nelder. This is a 4 treatment (rows) by 9 ordinal response (cols) table. Here's my simple code: #### cheese library(MASS) options(contrasts = c("contr.treatment", "contr.poly")) y = c(0,0, 1, 7, 8,8,19, 8,1, 6,9,12,11, 7,6, 1, 0,0, 1,1, 6, 8,23,7,
2007 Nov 26
1
newbie polr() question
Hi everyone, I'm trying to understand some R output here for ordinal regression. I have some integer data called "A" split up into 3 ordinal categories, top, middle and bottom, T, M and B respectively. I have to explain this output to people who have a very poor idea about statistics and just need to make sure I know what I'm talking about first. Here's the output:
2012 Mar 11
3
'Program Error' dialog box
I am running a windows executable, using wine, in a 'batch mode' - ie multiple times with different command parameters to the executable. For some parameters, the 'Program Error' dialog box appears and the wine process does not continue until the dialog box is closed. Is it possible to suppress the dialog box such that the entire batch can be completed without intervention?
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