similar to: nlminb(Splus) vs optim(R)

Displaying 20 results from an estimated 2000 matches similar to: "nlminb(Splus) vs optim(R)"

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
2004 Jun 23
1
Error message handling
Dear, R experts. Does anybody have experience with 'optim' function? I have an error message as the following. Error in optim(transcoefs, fn = hfdeviance, gr = hfdeviance.grad, method = "BFGS", : initial value in vmmin is not finite I want to make a comment when this happen. Is there way I can put *my* message after this error occur? Thanks in advance
2004 Aug 03
1
nlminb vs optim
Dear R-help group, I have to maximize a likelihood with 40 parameters and I want to compare the MLE given by "nlminb" (Splus2000, on Windows) with those given by "optim" (R, on Unix). 1) On Splus, The algorithm "nlminb" seems to converge (the parameters stabilize) , it stops after several iterations ( around 400) with the message :"FUNCTION EVALUATION LIMIT
2012 Oct 10
1
"optim" and "nlminb"
#optim package estimate<-optim(init.par,Linn,hessian=TRUE, method=c("L-BFGS-B"),control = list(trace=1,abstol=0.001),lower=c(0,0,0,0,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf,-Inf),upper=c(1,1,1,1,Inf,Inf,Inf,Inf,Inf,Inf,Inf,Inf,Inf)) #nlminb package estimate<-nlminb(init.par,Linn,gr=NULL,hessian=TRUE,control =
2007 Mar 06
1
optim(), nlminb() and starting values
Hi all ! I've been trying to maximize a likelihood using optim( ) function, but it seems that the function has several local maxima. I've tried in my algorithm with different starting values and depending on them "optim" obtains different results... I use the "L-BFGS-B" method setting the lower values as 1e-06, because my parameters must be strictly positive. Also
2010 Sep 29
1
nlminb and optim
I am using both nlminb and optim to get MLEs from a likelihood function I have developed. AFAIK, the model I has not been previously used in this way and so I am struggling a bit to unit test my code since I don't have another data set to compare this kind of estimation to. The likelihood I have is (in tex below) \begin{equation} \label{eqn:marginal} L(\beta) = \prod_{s=1}^N \int
2009 Nov 29
1
optim or nlminb for minimization, which to believe?
I have constructed the function mml2 (below) based on the likelihood function described in the minimal latex I have pasted below for anyone who wants to look at it. This function finds parameter estimates for a basic Rasch (IRT) model. Using the function without the gradient, using either nlminb or optim returns the correct parameter estimates and, in the case of optim, the correct standard
2004 Jun 11
2
Samba 3.0.3 on FC2: windows machine cannot join domain
I'm using Samba 3.0.3 on Fedora Core 2 with OpenLDAP 2.1.29 for a backend. I'm getting to typical "The user name could not be found." error upon trying to join a Windows box. I've gone through every digest on lists.samba.org and other sites and nothing has worked yet. Any suggestions: Here's what I've done so far: 1. Installed everything via RPMS: [root@smbtest
2004 Sep 23
1
Re: Samba 3.0.3 on FC2: windows machine cannot join domain
After, oh, six months of attempts here and there to read everyone's experiences with Samba/LDAP and inability for a windows 2000/XP machine to join the domain, I finally discovered what was not working properly. In my smb.conf I put: add machine script = /usr/local/sbin/smbldap-useradd -w "%u" As instructed by many How-to's and Idealx. However, I thought to myself, %m
2012 Jul 04
2
About nlminb function
Hello I want to use the nlminb function but I have the objective function like characters. I can summarize the problem using the first example in the nlminb documentation. x <- rnbinom(100, mu = 10, size = 10) hdev <- function(par) -sum(dnbinom(x, mu = par[1], size = par[2], log = TRUE)) nlminb(c(9, 12), objective=hdev) With the last instructions we obtain appropriate results. If I have
2006 Jul 23
1
How to pass eval.max from lme() to nlminb?
Dear R community, I'm fitting a complex mixed-effects model that requires numerous iterations and function evaluations. I note that nlminb accepts a list of control parameters, including eval.max. Is there a way to change the default eval.max value for nlminb when it is being called from lme? Thanks for any thoughts, Andrew -- Andrew Robinson Department of Mathematics and Statistics
2010 Dec 07
1
Using nlminb for maximum likelihood estimation
I'm trying to estimate the parameters for GARCH(1,1) process. Here's my code: loglikelihood <-function(theta) { h=((r[1]-theta[1])^2) p=0 for (t in 2:length(r)) { h=c(h,theta[2]+theta[3]*((r[t-1]-theta[1])^2)+theta[4]*h[t-1]) p=c(p,dnorm(r[t],theta[1],sqrt(h[t]),log=TRUE)) } -sum(p) } Then I use nlminb to minimize the function loglikelihood: nlminb(
2007 Dec 21
1
NaN as a parameter in NLMINB optimization
I am trying to optimize a likelihood function using NLMINB. After running without a problem for quite a few iterations (enough that my intermediate output extends further than I can scroll back), it tries a vector of parameter values NaN. This has happened with multiple Monte Carlo datasets, and a few different (but very similar) likelihood functions. (They are complicated, but I can send them
2010 Jul 10
1
Not nice behaviour of nlminb (windows 32 bit, version, 2.11.1)
I won't add to the quite long discussion about the vagaries of nlminb, but will note that over a long period of software work in this optimization area I've found a number of programs and packages that do strange things when the objective is a function of a single parameter. Some methods quite explicitly throw an error when n<2. It seems nlminb does not, but that does not mean that
2010 Mar 24
1
vcov.nlminb
Hello all, I am trying to get the variance-covariance (VCOV) matrix of the parameter estimates produced from the nlminb minimizing function, using vcov.nlminb, but it seems to have been expunged from the MASS library. The hessian from nlminb is also producing NaNs, although the estimates seems to be right, so I can't VCOV that way either. I also tried using the vcov function after minimizing
2012 Nov 22
1
Optimizing nested function with nlminb()
I am trying to optimize custom likelyhood with nlminb() Arguments h and f are meant to be fixed. example.R: compute.hyper.log.likelyhood <- function(a, h, f) { a1 <- a[1] a2 <- a[2] l <- 0.0 for (j in 1:length(f)) { l <- l + lbeta(a1 + f[j], a2 + h - f[j]) - lbeta(a1, a2) } return(l) } compute.optimal.hyper.params <- function(start, limits, h_, f_) { result
2008 Jun 11
1
difference between nlm and nlminb
Hi, I was wondering if someone could give a brief, big picture overview of the difference between the two optimization functions nlm and nlminb. I'm not familiar with PORT routines, so I was hoping someone could give an explanation. Thanks, Angelo _________________________________________________________________ Instantly invite friends from Facebook and other social networks to join yo
2012 Nov 04
1
Struggeling with nlminb...
Hallo together, I am trying to estimate parameters by means of QMLE using the nlminb optimizer for a tree-structured GARCH model. I face two problems. First, the optimizer returns error[8] false convergence if I estimate the functions below. I have estimated the model at first with nlm without any problems, but then I needed to add some constraints so i choose nlminb.
2008 Apr 08
1
question about nlminb
Dear All, I wanted to post some more details about the query I sent to s-news last week. I have a vector with a constraint. The constraint is that the sum of the vector must add up to 1 - but not necessarily positive, i.e. x[n] <- 1 -(x[1] + ...+x[n-1]) I perform the optimisation on the vector x such that x <- c(x, 1-sum(x)) In other words, fn <- function(x){ x <- c(x, 1 -
2008 Jul 25
0
nlminb--lower bound for parameters are dependent on each others
Hello I'm trying to solve two sets of equations (each set has four equations and all of them share common parameters) with nlminb procedure. I minimize one set and use their parameters as initial values of other set, repeating this until their parameters become very close to each other. I have several parameters (say,param1, param2) and their constraints are given as inequality and depend