similar to: global optimisation with inequality constraints

Displaying 20 results from an estimated 3000 matches similar to: "global optimisation with inequality constraints"

2008 Dec 28
1
Logistic regression with rcs() and inequality constraints?
Dear guRus, I am doing a logistic regression using restricted cubic splines via rcs(). However, the fitted probabilities should be nondecreasing with increasing predictor. Example: predictor <- seq(1,20) y <- c(rep(0,9),rep(1,10),0) model <- glm(y~rcs(predictor,n.knots=3),family="binomial") print(1/(1+exp(-predict(model)))) The last expression should be a nondecreasing
2008 Mar 14
1
Optimization with constraint.
Hello. I have some problems, when I try to model an optimization problem with some constraints. The original problem cannot be solved analytically, so I have to use routines like "Simulated Annealing" or "Sequential Quadric Programming". But to see how all this works in R, I would like to start with some simple problem to get to know the basics: The Problem: min f(x1,x2)=
2005 May 22
3
constraints
Is there a package in R that handles general linear (in-)equality + box constrained optimization? If it is not there, could anyone advise me which way to go? And/or point me to packages that solve these problems partially? best, ingmar -- Ingmar Visser Department of Psychology, University of Amsterdam Roetersstraat 15, 1018 WB Amsterdam The Netherlands http://users.fmg.uva.nl/ivisser/ tel:
2004 Aug 09
4
linear constraint optim with bounds/reparametrization
Hello All, I would like to optimize a (log-)likelihood function subject to a number of linear constraints between parameters. These constraints are equality constraints of the form A%*%theta=c, ie (1,1) %*% 0.8,0.2)^t = 1 meaning that these parameters should sum to one. Moreover, there are bounds on the individual parameters, in most cases that I am considering parameters are bound between zero
2018 May 05
1
adding overall constraint in optim()
Hi, You can use the projectLinear argument in BB::spg to optimize with linear equality/inequality constraints. Here is how you implement the constraint that all parameters sum to 1. require(BB) spg(par=p0, fn=myFn, project="projectLinear", projectArgs=list(A=matrix(1, 1, length(p0)), b=1, meq=1)) Hope this is helpful, Ravi [[alternative HTML version deleted]]
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
2006 Dec 08
1
MAXIMIZATION WITH CONSTRAINTS
Dear R users, I?m a graduate students and in my master thesis I must obtain the values of the parameters x_i which maximize this Multinomial log?likelihood function log(n!)-sum_{i=1]^4 log(n_i!)+sum_ {i=1}^4 n_i log(x_i) under the following constraints: a) sum_i x_i=1, x_i>=0, b) x_1<=x_2+x_3+x_4 c)x_2<=x_3+x_4 I have been using the ?ConstrOptim? R-function with the instructions
2009 Jul 02
2
constrained optimisation in R.
i want to estimate parameters with maximum likelihood method with contraints (contant numbers). for example sum(Ai)=0 and sum(Bi)=0 i have done it without the constraints but i realised that i have to use the contraints. Without constraints(just a part-not complete): skellamreg_LL=function(parameters,z,design) { n=length(z); mu=parameters[1]; H=parameters[2]; Apar=parameters[3:10];
2011 Oct 31
2
Linear Regression with Linear Equality Constraint
Please advice on the package I should use to run a linear regression model (weighted least squared) with linear equality constraint. I initially tried "constrOptim" but it turned out that it only supported inequality linear constraint. Thank you very much in advance. Cheers, Jon -- View this message in context:
2010 Aug 10
1
[Fwd: Re: optimization subject to constraints]
-------------- next part -------------- An embedded message was scrubbed... From: Gildas Mazo <gildas.mazo at curie.fr> Subject: Re: [R] optimization subject to constraints Date: Tue, 10 Aug 2010 15:49:19 +0200 Size: 4924 URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100810/78862894/attachment.eml>
2008 Jun 17
2
constrOptim with method = "L-BFGS-B"
Hi, i need to minimize a quadratic function with boundary condidtions and one equality condition. In order to do that i converted the equality constraint into 2 inequality constaints and passed everything cia constrOptim, as the manual said: everything included in the ... will be passed to Optim that will pass it back to fn in case it does not need it. My code is the following: mat <-
2008 Jun 26
1
Question about Constraint Optimization
Dear All, I am having trouble in using R function "constrOptim" to do constraint optimization. It seems that "constrOptim" calls function "optim" when it does the optimization, and "optim" allows us to set "method" to be "SANN" if we want to use simulated annealing. In "optim", the function allows us to set gradient to be
2012 Oct 19
2
Which package/function for solving weighted linear least squares with inequality and equality constraints?
Dear All, Which package/function could i use to solve following linear least square problem? A over determined system of linear equations is given. The nnls-function may would be a possibility BUT: The solving is constrained with a inequality that all unknowns are >= 0 and a equality that the sum of all unknowns is 1 The influence of the equations according to the solving process is
2005 May 20
3
constrained optimization
Hello, I've got to compute a minimization equation under an equality constraint (Min g(x1,x2,x3) with x1+x2=const). The Constroptim function does not authorize an equality condition but only inequality conditions. Which function can I use instead? Thank you very much for your help. Gael Robert - +33 1 42 14 27 96 ****************************************************************** This
2004 Apr 27
1
constrOptim does ineq, not eq, but who do ?
Hi everybody, please, could you give me help ? I scanned the help archives and didn't found hints... I want to solve a large sparse linear system subjected to an inequality constrains (all solutions positive) and an equality constrain (all solutions sum to 1), thus I tried to fool constrOptim using: x[1] + 0 + ... + 0 >= 0 ... 0 + 0 + ... + x[n] >= 0 x[1] + x[2] + ... +
2009 Nov 04
3
Constrained Optimization
Hi All, I'm trying to do the following constrained optimization example. Maximize x1*(1-x1) + x2*(1-x2) + x3*(1-x3) s.t. x1 + x2 + x3 = 1 x1 >= 0 and x1 <= 1 x2 >= 0 and x2 <= 1 x3 >= 0 and x3 <= 1 which are the constraints. I'm expecting the answer x1=x2=x3 = 1/3. I tried the "constrOptim" function in R and I'm running into some issues. I first start off
2008 May 12
1
hessian in constrained optimization (constrOptim)
Dear helpers, I am using the function "constrOptim" to estimate a model with ML with an inequality constraint using the option method='Nelder-Mead'. When I specify the option: hessian = TRUE I obtain the response: Error in f(theta, ...) : unused argument(s) (hessian = TRUE) I guess the function "constrOptim" does not allow this argument which, on the other hand, is
2007 Sep 07
1
'initial value not feasible' in constrOptim
Dear friends. I am using function constrOptim(c(0.5,0.3,0.5), fit.error, fit.error.grr, ui=-1*ui,ci=-1*ci) and I am confronted with error message "initial value not feasible" I plug in the initial value of (0.5,0.3,0.5) to function fit.error and fit.error.grr and have pretty reasonable result. I inequality "ui %*% theta - ci >= 0" as suggested in the R manual and it is
2009 Sep 11
1
constrOptim parameters
Dear R wizards: I am playing (and struggling) with the example in the constrOptim function. simple example. let's say I want to constrain my variables to be within -1 and 1. I believe I want a whole lot of constraints where ci is -1 and ui is either -1 or 1. That is, I have 2*N constraints. Should the following work? N=10 x= rep(1:N) ci= rep(-1, 2*N) ui= c(rep(1, N), rep(-1, N))
2007 Aug 02
1
constraint in constrOptim
I'm using the function constrOptim together with the "SANN" method and my objective function (f) has two parameters. One of the parameters needs be into (2^(-10), 2^4) range and the other into (2^(-2), 2^12) range. How can I do it using constrOptim?? Thank you André Rossi Alertas do Yahoo! Mail em seu celular. Saiba mais em http://br.mobile.yahoo.com/mailalertas/