Error Function Value Is Not Finite
Contents |
5 Sep error function gsl 2007 12:38:20 +0200 Hello, I receive the error initial value in 'vmmin' is not finite optim in subject following a call to int gsl_root_fsolver_set ( gsl_root_fsolver *, gsl_function *,
Initial Value In 'vmmin' Is Not Finite Fitdistr
double, double); The gsl_function I send has roots in the specified limits. Any ideas?! Thanks, Michael. reply via email to [Prev in Thread] Current Thread initial value in 'vmmin' is not finite beta [Next in Thread] [Help-gsl] function value is not finite, michael ramati<= Re: [Help-gsl] function value is not finite, Jordi Gutiérrez Hermoso, 2007/09/05 RE: [Help-gsl] function value is not finite, michael ramati, 2007/09/06 Prev by Date: Re: [Help-gsl] error function for complex argument Next by Date: Re: [Help-gsl] function value is not finite Previous by thread: Re: [Help-gsl] error function for complex argument Next by thread: Re: [Help-gsl] function value is not finite Index(es): Date Thread
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers initial value in 'vmmin' is not finite arima or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x
Pelwei
Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it
Initial Value In 'vmmin' Is Not Finite Mle
only takes a minute: Sign up MLE error in R: initial value in 'vmmin' is not finite up vote 5 down vote favorite Suppose I have 2 data.frame objects: df1 <- data.frame(x = 1:100) df1$y <- 20 + 0.3 * https://lists.gnu.org/archive/html/help-gsl/2007-09/msg00003.html df1$x + rnorm(100) df2 <- data.frame(x = 1:200000) df2$y <- 20 + 0.3 * df2$x + rnorm(200000) I want to do MLE. With df1 everything is ok: LL1 <- function(a, b, mu, sigma) { R = dnorm(df1$y - a- b * df1$x, mu, sigma) -sum(log(R)) } library(stats4) mle1 <- mle(LL1, start = list(a = 20, b = 0.3, sigma=0.5), fixed = list(mu = 0)) > mle1 Call: mle(minuslogl = LL1, start = list(a = 20, b = 0.3, sigma = 0.5), http://stackoverflow.com/questions/24383746/mle-error-in-r-initial-value-in-vmmin-is-not-finite fixed = list(mu = 0)) Coefficients: a b mu sigma 23.89704180 0.07408898 0.00000000 3.91681382 But if I would do the same task with df2 I would receive an error: LL2 <- function(a, b, mu, sigma) { R = dnorm(df2$y - a- b * df2$x, mu, sigma) -sum(log(R)) } mle2 <- mle(LL2, start = list(a = 20, b = 0.3, sigma=0.5), fixed = list(mu = 0)) Error in optim(start, f, method = method, hessian = TRUE, ...) : initial value in 'vmmin' is not finite How can I overcome it? r mle share|improve this question edited Jun 24 '14 at 10:19 user3710546 asked Jun 24 '14 at 10:03 BiXiC 317317 Not reproducible. Please change how df1 and df2 are defined. –user3710546 Jun 24 '14 at 10:09 Try this variant –BiXiC Jun 24 '14 at 10:15 add a comment| 2 Answers 2 active oldest votes up vote 3 down vote accepted The value of R becomes zero at some point; it leads to a non-finite value of the function to be minimized and returns an error. Using the argument log=TRUE handles better this issue, see function LL3 below. The following gives some warnings but a result is returned, with parameter estimates close to the true parameters. require(stats4) set.seed(123) e <- rnorm(200000) x <- 1:200000 df3 <- data.frame(x) df3$y <- 20 + 0.3 * df3$x + e LL3 <- function(a, b, mu, sigma) { -sum(dnorm(df3$y - a- b
Create new account Request new password Recent News Version 2.6.7 of OpenMx now available Version 2.5.2 of OpenMx now available Version 2.3.1 of OpenMx now available Advanced Genetic Epidemiology Statistical http://openmx.psyc.virginia.edu/thread/3955 Workshop: October 26-30 2015, in Richmond, VA New features in OpenMx v2.2 Concerning the Currently Available Versions of OpenMx Version 2.0.1 now available OpenMx version 2.0 is officially released! Third OpenMx 2.0 beta is released Second OpenMx 2.0 beta is released more Navigation Feed aggregator Home › Forums › OpenMx Help › OpenMx Error Messages fitfunction is not finite Login or register to post comments is not 4 replies [Last post] Fri, 02/20/2015 - 06:18 karobro Offline Joined: 01/16/2013 Hi, I am trying to fit a saturated twin model to 9 ordinal variables (representing age at observation), in which participants have either 1, 2 or 3 observations each. Thus, there is quite a bit of missing data. When running the model I get the following error: Sat5.fitfunction is not finite. Here is not finite is info about version and platform: OpenMx version: 2.0.1.4157 R version: R version 3.1.1 (2014-07-10) Platform: x86_64-w64-mingw32 Default optimiser: NPSOL Does this mean that there could be a problem due to too many NA’s in the data? I expected FIML to take care of this. I saw another thread #3940 about the same issue, but couldn’t really cut out what was causing the error. I tried the CSOLNP optimizer and mxTryHard() with the same result. Could it be bad starting values that’s causing the error in my case? When running it in OpenMx1.4-3060 I get the following error message: Objective function returned a value of NaN at iteration 23.63. I have attached the script in case that helps to clarify anything. Many thanks, Karoline AttachmentSize Saturated_Beta_OpenMx.R15.31 KB ‹ mxFactor command Protection stack too large › Top Login or register to post comments Printer-friendly version Send to friend Sat, 02/21/2015 - 17:22 #1 neale Offline Joined: 07/31/2009 Hi Karoline I agree with Rob Hi Karoline I agree with Rob that using a Stand matrix type would be better. I'd typically start correlations at zero not .8 because that is further from being non-p