Displaying 20 results from an estimated 10000 matches similar to: "Does R have a function for constrained minimiztion"
2005 Nov 28
3
Looking for constrained optimisation code
_______________________________________________________________________________________
Hi,
I was just wondering if there was any available R code that could handle
general constrained optimisation problems. At the moment I'm using
nlminb and optim, both of which allow box constraints on the parameters,
but ideally I'd like to be able to specify more general constraints on
the solution
2003 Apr 01
1
Nlminb equivalent function in R?
Hello everybody
I need some help. Currently, I'm translating a code from Splus to R. In Splus code there is the function nlminb (Nonlinear Minimization subject to Box Constraints) used. Does anybody know an equivalent function in R?
Thanks for help
Kind regards,
Beat Huggler
_____________________________________________
Beat Huggler
Quantitative Analysis
RMF Investment Management
2001 Sep 14
1
Supply linear constrain to optimizer
Dear R and S users,
I've been working on fitting finite mixture of negative exponential
distributions using maximum likelihood based on the example given in MASS.
So far I had much success in fitting two components. The problem started
when I tried to extend the procedure to fit three components.
More specifically,
likelihood = sum( ln(c1*exp(-x/lambda1)/lambda1 +
c2*exp(-x/lambda2)/lambda2
2010 Feb 09
2
Double Integral Minimization Problem
Hello all,
I am trying to minimize a function which contains a double integral, using
"nlminb" for the minimization and "adapt" for the integral. The integral is
over two variables (thita and radiusb)
and the 3 free parameters I want to derive from the minimization are
counts0, index and radius_eff.
I have used both tasks in the past successfully but this is the first time
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 Oct 12
2
Minimization/Optimization under functional constraints
Hi,
I hope someone can help me with the following issue.
I need find the minimum beta that satisfies the following:
inf{beta>0 | f(x+beta*f(x))*f(x)<=0}
where f() is a function and x is a sample statistic.
Functions such as "nlminb" and "constrOptim" minimize a function and output
the parameter (under parameter constraints). I need to minimize the
parameter (also
2007 Feb 19
1
Documenting options specific to a package.
If one specifies new options in a package, using the options()
function, where does/should one document these new options?
E.g. suppose that I put the line
options(melvin=42)
in a file zzz.R in the R directory of the package source, where the
package contains functions foo(), bar(), clyde(), and irving() which
all query options("melvin") and take some action based on the value
of
2004 Feb 24
2
convergence in polr
Hello splus-users, I am trying to fit a regression model for an ordered
response factor. So I am using the function polr in library(MASS). My data
is a matrix of 1665 rows and 63 columns (one of the column is the dependent
variable). The code I use is polr(as.ordered(q23p)~.,data=newdatap)
but I am getting the following warning message singularity encountered in:
nlminb.1(temp, p, liv, lv,
2007 Sep 12
1
enquiry
Dear R-help,
I am trying to estimate a Cox model with nested effects basing on the
minimization of the overall AIC; I have two frailties terms, both gamma
distributed. There is a error message (theta2 argument misses) and I
don?t understand why. I would like to know what I have wrong. Thank you
very much for your time.
fitM7 <- coxph(Surv(lifespan,censured) ~ south + frailty(id,
2002 Apr 11
2
Obtaining names of ``...'' arguments.
This may be an FAQ, but a (perfunctory) search failed to turn it up.
Suppose I have a function foo(...){<something>} and I want to obtain,
inside foo, the names of items comprising the ``...''. E.g. if I
call
foo(melvin,clyde,irving)
I want to be able to loop through the ``...'' and successively obtain
the text strings "melvin", "clyde", and
2019 Nov 04
3
Puzzled about a new method for "[".
On 5/11/19 3:41 AM, Hadley Wickham wrote:
> For what it's worth, I don't think this strategy can work in general,
> because a class might have attributes that depend on its data/contents
> (e.g. https://vctrs.r-lib.org/articles/s3-vector.html#cached-sum). I
> don't think these are particularly common in practice, but it's
> dangerous to assume that you can restore a
2019 Nov 04
3
Puzzled about a new method for "[".
On 04/11/2019 4:40 p.m., Pages, Herve wrote:
> Hi Rolf,
>
> On 11/4/19 12:28, Rolf Turner wrote:
>>
>> On 5/11/19 3:41 AM, Hadley Wickham wrote:
>>
>>> For what it's worth, I don't think this strategy can work in general,
>>> because a class might have attributes that depend on its data/contents
>>> (e.g.
>>>
2006 Apr 13
4
Creating an environment for a function.
I am trying to build a function in a context where the environment
concept would appear to be useful. But I'm a bit foggy about this
concept and would appreciate some pointers and advice.
Basically the function I'm building, say foo(x,t), is a function of
two variables). Depending on the value of t, foo will return one of
the values f1(x), f2(x), ..., fk(x), where each of f1, ..., fk is
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
2001 Dec 20
2
library()
I've just installed version 1.4.0 of R, and am experiencing
a puzzling phenomenon with the library() function.
I have .lib.loc set as follows:
> .lib.loc
[1] "/usr/local/lib/R/library" "/home/faculty/rolf/Rlib"
If I invoke
> library(melvin)
I get the error message
Error in library(melvin) : There is no package called `melvin'
but if I invoke
>
2013 Feb 20
2
'gmm' package: How to pass controls to a numerical solver used in the gmm() function?
Hello --
The question I have is about the gmm() function from the 'gmm' package
(v. 1.4-5).
The manual accompanying the package says that the gmm() function is
programmed to use either of four numerical solvers -- optim, optimize,
constrOptim, or nlminb -- for the minimization of the GMM objective
function.
I wonder whether there is a way to pass controls to a solver used
while calling
2001 Nov 15
1
samba daemon won't start.
-----Original Message-----
From: MAKRO BAGAFORO, Melvin
Sent: Friday, November 16, 2001 11:52 AM
To: 'Ben Elliston'
Subject: RE: samba error
Hi Guys,
I already downloaded the latest config.guess
and config.sub files, './configure' command is now error free. However, I
have another problem, samba won't start. Samba test results:
2008 Jul 26
1
S-PLUS code in R
Dear R-users,
I have sent another mail some hour ago about a matlab Code I was trying to
translate in R.
Actually I have found a simpler code originally written in S-PLUS for the
same function.
Author's page -> http://math.bu.edu/people/murad/methods/locwhitt/
=============================================================
rfunc_function(h, len, im, peri)
# h -- Starting H value for
2013 Oct 20
5
nlminb() - how do I constrain the parameter vector properly?
Greets,
I'm trying to use nlminb() to estimate the parameters of a bivariate normal sample and during one of the iterations it passes a parameter vector to the likelihood function resulting in an invalid covariance matrix that causes dmvnorm() to throw an error. Thus, it seems I need to somehow communicate to nlminb() that the final three parameters in my parameter vector are used to
2000 Sep 13
2
minimization
Hi, I got a code from S that uses 'nlminb' to minimize a function
with constraints. Is there a similar function in R?
Thanks.
R. Heberto Ghezzo Ph.D.
Meakins-Christie Labs
McGill University
Montreal - Canada
heberto at meakins.lan.mcgill.ca
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read