similar to: nlm gradient and hessian

Displaying 20 results from an estimated 10000 matches similar to: "nlm gradient and hessian"

2003 Oct 17
2
nlm, hessian, and derivatives in obj function?
I've been working on a new package and I have a few questions regarding the behaviour of the nlm function. I've been (for better or worse) using the nlm function to fit a linear model without suppling the hessian or gradient attributes in the objective function. I'm curious as to why the nlm requires 31 iterations (for the linear model), and then it doesn't work when I try to add
2006 Sep 30
1
Gradient problem in nlm
Hello everyone! I am having some trouble supplying the gradient function to nlm in R for windows version 2.2.1. What follows are the R-code I use: fredcs39<-function(a1,b1,b2,x){return(a1+exp(b1+b2*x))} loglikcs39<-function(theta,len){ value<-sum(mcs39[1:len]*fredcs39(theta[1],theta[2],theta[3],c(8:(7+len))) - pcs39[1:len] * log(fredcs39(theta[1],theta[2],theta[3],c(8:(7+len)))))
2003 Nov 17
0
gradient option in 'nlm' function
<FONT face="Default Sans Serif, Verdana, Arial, Helvetica, sans-serif" size=2><DIV>Dear list members,</DIV><DIV>&nbsp;</DIV><DIV>I am trying to use "nlm" function to maximize a mixture likelihood of beta densities. There are five unknown parameters in the likelihood. Since I can get the analytic gradient, I attach the "gradient"
2007 Sep 16
1
Problem with nlm() function.
In the course of revising a paper I have had occasion to attempt to maximize a rather complicated log likelihood using the function nlm(). This is at the demand of a referee who claims that this will work better than my proposed use of a home- grown implementation of the Levenberg-Marquardt algorithm. I have run into serious hiccups in attempting to apply nlm(). If I provide gradient and
2004 Apr 14
1
How does nlm work?
Dear R users, I have looked in the reference Schnabel, R. B., Koontz, J. E. and Weiss, B. E. (1985) A modular system of algorithms for unconstrained minimization. _ACM Trans. Math. Software_, *11*, 419-440. cited in the nlm help. This article says that the algorithm permits the use of step selection (line search, dogleg and optimal step), analytic or finite diference gradient
2006 Jun 19
0
help on nlm (gradient) (fwd)
Hello No worries anymore. Figured it out. Thanks for everything. Luz ---------- Forwarded message ---------- Date: Sun, 18 Jun 2006 23:12:25 -0600 (MDT) From: Luz Maria Palacios Derflingher <palacios at math.ucalgary.ca> To: r-help at lists.R-project.org Cc: r-help at stat.math.ethz.ch. Subject: help on nlm (gradient) Hello. I am having some trouble using nlm in R for windows version
2011 Sep 22
1
nlm's Hessian update method
Hi R-help! I'm trying to understand how R's nlm function updates its estimate of the Hessian matrix. The Dennis/Schnabel book cited in the references presents a number of different ways to do this, and seems to conclude that the positive-definite secant method (BFGS) works best in practice (p201). However, when I run my code through the optim function with the method as "BFGS",
1999 Nov 24
1
nlm continued
OK I figured it out. The attributes have to be on the value returned, not on the function itself. I tried a linear (not log linear) regression with Poisson, using only the gradient, not the hessian. It took one extra iteration (13 instead of 12) and gave twice as many warnings (28 instead of 16) compared to not supplying the gradient. The answers are identical to 5 decimal places. Sorry to
2003 May 28
0
supplying the Hessian to "nlm"
Dear all, I am trying to minimize a function with 3 parameters using nlm. I have worked out the 2nd derivatives (incl the cross-product terms) and would like to supply them to nlm for evaluation. What I am not sure about is how to set up the Hessian matrix for nlm. That is, attr(lhat, "hessian") <- c(???) Do I have to enter all 9 of the entries or just the lower triangle of the
2005 Dec 04
1
Understanding nonlinear optimization and Rosenbrock's banana valley function?
GENERAL REFERENCE ON NONLINEAR OPTIMIZATION? What are your favorite references on nonlinear optimization? I like Bates and Watts (1988) Nonlinear Regression Analysis and Its Applications (Wiley), especially for its key insights regarding parameter effects vs. intrinsic curvature. Before I spent time and money on several of the refences cited on the help pages for "optim",
2003 Oct 24
1
first value from nlm (non-finite value supplied by nlm)
Dear expeRts, first of all I'd like to thank you for the quick help on my last which() problem. Here is another one I could not tackle: I have data on an absorption measurement which I want to fit with an voigt profile: fn.1 <- function(p){ for (i1 in ilong){ ff <- f[i1] ex[i1] <- exp(S*n*L*voigt(u,v,ff,p[1],p[2],p[3])[[1]]) } sum((t-ex)^2) } out <-
2007 Mar 02
2
nlm() problem : extra parameters
Hello: Below is a toy logistic regression problem. When I wrote my own code, Newton-Raphson converged in three iterations using both the gradient and the Hessian and the starting values given below. But I can't get nlm() to work! I would much appreciate any help. > x [1] 10.2 7.7 5.1 3.8 2.6 > y [1] 9 8 3 2 1 > n [1] 10 9 6 8 10 derfs4=function(b,x,y,n) {
2009 Aug 07
0
Bug in nlm, found using sem; failure in several flavors (PR#13882)
Adam, It seems that your attachment didn't make it through. That aside, my experience with strange errors like those (random type not implemented ones) has been that you may be looking at a memory problem on you machine. Given that you can't replicate on another platform (and the .csv file didn't come through), I would think it wise to start there. My 2c. And I love bacon too :)
2007 May 26
1
bug from nlm function (PR#9711)
Full_Name: bernardo moises lagos alvarez Version: 2.4.0 OS: Windows XP professional Submission from: (NULL) (152.74.219.16) I need obtained the MLE of weibull parameters using the nlm with exact gradient an hessian. I am doing. bug report :Erro en log(b) : el argumento "b" est? ausente, sin default 1.Construction to objectiv functin with n=1 data
2009 Aug 07
1
Bug in nlm, found using sem; failure in several flavors (PR#13881)
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1660387551-1458482416-1249639718=:2997 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; FORMAT=flowed Content-ID: <Pine.LNX.4.64.0908071039211.2997 at parser.ilovebacon.org> Hello, There appears to be a bug in the nlm function, which I
2006 Nov 10
1
Variable limit in nlm?
Admittedly I am using an old version 1.7.1, but can anyone tell if this is or was a problem. I can only get nlm (nonlinear minimization) to adjust the first three components of function variable. No gradient or hessian is supplied. E.G.; fnoise function(y) { y[5]/(y[4]*sp2) * exp(-((x[,3]-y[1]-y[2]*x[,1]-y[3] *x[,2])/y[4])^2/2) + (1-y[5])/(y[9]*sp2) * exp(-((x[,3]-y[6]-y[7]*x[,1]-y[8]
2007 Jun 15
0
Question with nlm
Hi, I would really appreciate if I could get some help here. I'm using nlm to minimize my negative log likelihood function. What I did is as follows: My log likelihood function (it returns negative log likelihood) with 'gradient' attribute defined inside as follows: # ==========Method definition====================== logLikFunc3 <- function(sigma, object, totalTime) { y <-
2001 Nov 25
2
another optimization question
Dear R list members, Since today seems to be the day for optimization questions, I have one that has been puzzling me: I've been doing some work on sem, my structural-equation modelling package. The models that the sem function in this package fits are essentially parametrizations of the multinormal distribution. The function uses optim and nlm sequentially to maximize a multinormal
2011 Nov 30
1
How can I pick a matrix from a function? (Out Product of Gradient)
Hi all, I would like to use optim() to estimate the equation by the log-likelihood function and gradient function which I had written. I try to use OPG(Out Product of Gradient) to calculate the Hessian matrix since sometime Hessian matrix is difficult to calculate. Thus I want to pick the Gradient matrix from the gradient function. Moreover, could R show the process of calculation on gradient
1997 Nov 21
2
R-alpha: nlm and gradients
At present the documentation for nlm refers the reader to Dennis and Schnabel for details on the algorithms. It also states that the function is liable to change. Can anyone tell me if the current version of nlm uses only function values or if it can use gradients and Hessians when they are available? I would like to get an idea of how difficult it would be to port the development versions of