similar to: Logistic Regression using optim() give "L-BFGS-B" error, please help

Displaying 20 results from an estimated 3000 matches similar to: "Logistic Regression using optim() give "L-BFGS-B" error, please help"

2008 Sep 28
0
constrained logistic regression: Error in optim() with method = "L-BFGS-B"
Dear R Users/Experts, I am using a function called logitreg() originally described in MASS (the book 4th Ed.) by Venebles & Ripley, p445. I used the code as provided but made couple of changes to run a 'constrained' logistic regression, I set the method = "L-BFGS-B", set lower/upper values for the variables. Here is the function, logitregVR <- function(x, y, wt =
2005 Feb 20
1
logistic regression and 3PL model
Hello colleagues, This is a follow up to a question I posed in November regarding an analysis I was working on. Thank you to Dr. Brian Ripley and Dr. John Fox for helping me out during that time. I am conducting logistic regression on data set on psi (ESP) ganzfeld trials. The response variable is binary (correct/incorrect), with a 25% guessing base rate. Dr. Ripley suggested that I
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
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 =
2002 Jul 22
1
"New" problem with polr (or optim, or ...)
Hello from a presently sunny Helsinki! I've bee trying to repeat an analysis I did about 18 months ago (the reviewers of the paper want something adding to it). I'm using R1.5.0, but I couldn't see anything in the list of changes between this and 1.5.1 to suggest it would act any differently. The data is observational, on the changes in the population status of carabid beetles, and
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
2007 Aug 02
1
proportional odds model
Hi all!! I am using a proportinal odds model to study some ordered categorical data. I am trying to predict one ordered categorical variable taking into account only another categorical variable. I am using polr from the R MASS library. It seems to work ok, but I'm still getting familiar and I don't know how to assess goodness of fit. I have this output, when using response ~ independent
2007 Aug 02
1
proportional odds model in R
Hi all!! I am using a proportinal odds model to study some ordered categorical data. I am trying to predict one ordered categorical variable taking into account only another categorical variable. I am using polr from the R MASS library. It seems to work ok, but I'm still getting familiar and I don't know how to assess goodness of fit. I have this output, when using response ~ independent
2006 Mar 14
1
Ordered logistic regression in R vs in SAS
I tried the following ordered logistic regression in R: mod1 <- polr(altitude~sp + wind_dir + wind_speed + hr, data=altioot) But when I asked The summary of my regression I got the folloing error message: > summary (mod1) Re-fitting to get Hessian Error in optim(start, fmin, gmin, method = "BFGS", hessian = Hess, ...) : the initial value of 'vmin' is not
2004 Feb 19
0
polr warning message optim
Hello R-users, I am using polr function in library(MASS). The code I use is the following: polr(as.ordered(q23p)~.,data=as.data.frame(datapr2)) where datapr2 is a matrix of 63 columns (together with the dependent variable) and 1665 rows. But I am receiving the warning message Error in optim(start, fmin, gmin, method = "BFGS", hessian = Hess, ...) I would be very greatfull if anyone
2007 Jun 10
0
initial value for optim in polr question
Hi, I have a problem with initial value for optim in polr that R report. After a call to polr, it complains that: Error in optim(start, fmin, gmin, method="BFGS", hessian= Hess, ...) : initial value in 'vmin' is not finite. Would you please suggest a way round to this problem? Thank you so much in advance. Rgds, - adschai
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
2005 Sep 05
1
convergence for proportional odds model
Hey, everyone, I am using proportional odds model for ordinal responses in dose-response experiments. For some samll data, SAS can successfully provide estimators of the parameters, but the built-in function polr() in R fails. Would you like to tell me how to make some change so I can use polr() to obtain the estimators? Or anyone can give me a hint about the conditions for the existance of MLE
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, ...) :
2008 Mar 13
0
help with summary(polr_model)
hello everybody I'm a newbie with ordered probit and with polr too. The problem is that I have a dependent variable I need to explain with an ordered probit that is > head(dfscale$sod.sit.ec.fam,100) > [1] 5 7 5 6 5 5 6 8 6 8 8 8 6 6 6 5 0 5 NA 6 > [21] 7 NA NA 0 0 2 5 3 6 6 7 6 NA 8 6 6 7 NA NA NA > [41] 4 5 NA 10 3 9 10 10 7 5 5 5 NA
2011 Apr 15
3
GLM output for deviance and loglikelihood
It has always been my understanding that deviance for GLMs is defined by; D = -2(loglikelihood(model) - loglikelihood(saturated model)) and this can be calculated by (or at least usually is); D = -2(loglikelihood(model)) As is done so in the code for 'polr' by Brian Ripley (in the package 'MASS') where the -loglikehood is minimised using optim; res <-
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
2011 Nov 17
0
Non-finite finite-difference value" error in eha's, aftreg
This kind of error seems to surprise R users. It surprises me that it doesn't happen much more frequently. The "BFGS" method of optim() from the 1990 Pascal version of my book was called the Variable Metric method as per Fletcher's 1970 paper it was drawn from. It really works much better with analytic gradients, and the Rvmmin package which is an all-R version that adds bounds
2011 Nov 16
1
"Non-finite finite-difference value" error in eha's aftreg
Hi list! I'm getting an error message when trying to fit an accelerated failure time parametric model using the aftreg() function from package eha: > Error in optim(beta, Fmin, method = "BFGS", control = list(trace = > as.integer(printlevel)), : > non-finite finite-difference value [2] This only happens when adding four specific covariates at the same time in the
2004 Jan 05
3
optim function : "BFGS" vs "L-BFGS-B"
Dear kind R-experts. Does anybody have an experience to use optim function? If yes, what is the main difference between two method "BFGS" vs "L-BFGS-B"? I used "BFGS" method and got what I wanted. But when I used "L-BFGS-B" the error message said that "L-BFGS-B needs finite values of fn". So that means "BFGS" method can handle even if fn