Displaying 20 results from an estimated 6000 matches similar to: "Not nice behaviour of nlminb (windows 32 bit, version, 2.11.1)"
2010 Jul 09
1
Not nice behaviour of nlminb (windows 32 bit, version 2.11.1)
nlminb( obj = function(x) x, start=1, lower=-Inf, upper=Inf )
$par
[1] 0
$objective
[1] 0
$convergence
[1] 0
$message
[1] "absolute function convergence (6)"
$iterations
[1] 1
$evaluations
function gradient
2 2
[[alternative HTML version deleted]]
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
2012 Sep 26
2
non-differentiable evaluation points in nlminb(), follow-up of PR#15052
This is a follow-up question for PR#15052
<http://bugs.r-project.org/bugzilla3/show_bug.cgi?id=15052>
There is another thing I would like to discuss wrt how nlminb() should
proceed with NAs. The question is: What would be a successful way to
deal with an evaluation point of the objective function where the
gradient and the hessian are not well defined?
If the gradient and the hessian both
2008 Dec 03
1
nlminb: names of parameter vector not passed to objective function
Dear R developers,
I tried to use nlminb instead of optim for a current problem (fitting
parameters of a differential equation model). The PORT algorithm
converged much better than any of optim's methods and the identified
parameters are plausible. However, it took me a while before spotting
the reason of a technical problem that nlminb, in contrast to optim,
does not pass names of the
2009 May 01
1
nlminb - Port library codes
Having looked at documentation and codes, I'm still looking to find out
who did the installation of the Port libraries. As I work on
optimization code improvements, there are often choices of settings
(tolerances etc.), and I'd prefer to learn if there are particular
reasons for choices before diving in and making any adjustments.
It is also worth giving credit where it is due. Given
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 =
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(
2011 Jan 21
3
nlminb doesn't converge and produce a warning
Hi Everybody,
My problem is that nlminb doesn't converge, in minimising a logLikelihood
function, with 31*6 parameters(2 weibull parameters+29 regressors repeated 6
times).
I use nlminb like this :
res1<-nlminb(vect, V, lower=c(rep(0.01, 12), rep(0.01, 3), rep(-Inf, n-15)),
upper=c(rep(Inf, 12), rep(0.99, 3), rep(Inf, n-15)), control =
list(maxit=1000) )
and that's the result :
2011 Aug 16
2
Calibrating the risk free interest rate using nlminb
Dear R-users
I am trying to find a value for the risk free rate minimizing the difference
between a BS call value with impl. volatilities minus the market price of a
call (assuming this is just the average bid ask price)
Here is my data:
http://r.789695.n4.nabble.com/file/n3747509/S%26P_500_calls%2C_jan-jun_2010.csv
S%26P_500_calls%2C_jan-jun_2010.csv
S0 <- 1136.03
q <- 0.02145608
S0
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
2006 Apr 20
2
nlminb( ) : one compartment open PK model
All,
I have been able to successfully use the optim( ) function with
"L-BFGS-B" to find reasonable parameters for a one-compartment
open pharmacokinetic model. My loss function in this case was
squared error, and I made no assumptions about the distribution
of the plasma values. The model appeared to fit pretty well.
Out of curiosity, I decided to try to use nlminb( ) applied to
a
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 May 15
1
logistic transformation using nlminb
Dear all,
I want to find the optimal values of a vector, x (with 6 elements)
say, satisfying the following conditions:
1. for all x>=0
2. sum(x)=1
3. x[5]<=0.5 and x[6]<=0.5
For the minimisation I'm using nlminb and to satisfy the first 2
conditions the logistic transformation is used with box constraints
for condition 3. However, I don't seem to be able to get the values x
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
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
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 -
2009 May 30
1
A problem about "nlminb"
Hello everyone!
When I use "nlminb" to minimize a function with a variable of almost 200,000
dimension, I got the following error.
> nlminb(start=start0, msLE2, control = list(x.tol = .001))
Error in vector("double", length) : vector size specified is too large
I had the following setting
options(expressions=60000)
options(object.size=10^15)
I have no idea about what
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