Displaying 20 results from an estimated 800 matches similar to: "Constrained Optimisation"
2012 Sep 17
2
Constraint Optimization with constrOptim
Hi,
I am having trouble using constrOptim. My target is to do a portfolio optimization and there some constraints have to be fulfilled.
1) The weight of each share of the portfolio has to be greater than 0
2) The sum of these weights has to be 1
I am able to fulfill either the first or the second constraint but not both.
One simple way would be to fulfill the first constraint by using optim as
2008 Mar 03
2
Constrained regression
Dear list members,
I am trying to get information on how to fit a linear regression with
constrained parameters. Specifically, I have 8 predictors , their
coeffiecients should all be non-negative and add up to 1. I understand it is
a quadratic programming problem but I have no experience in the subject. I
searched the archives but the results were inconclusive.
Could someone provide suggestions
2008 Jul 19
2
Non-linearly constrained optimisation
Dear R Users,
I am looking for some guidance on setting up an optimisation in R with
non-linear constraints.
Here is my simple problem:
- I have a function h(inputs) whose value I would like to maximise
- the 'inputs' are subject to lower and upper bounds
- however, I have some further constraints: I would like to constrain the
values for two other separate function f(inputs) and
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
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];
2012 Apr 26
0
constrained optimisation without second order derivatives? - lnsrch error
Hi,
I'm trying to do some constrained non-linear optimisation, but my
function does not have second order derivatives everywhere.
To be a little more specific (the actual function is huge and
horrible, so it would probably be better to just describe it) my model
has four variables and I'm using optim to minimise an error term.
My data is split into discreet days and I have two types of
2003 Oct 31
1
constrained nonlinear optimisation in R?
Hello. I have searched the archives but have not found anything. I
need to solve a constrained optimisation problem for a nonlinear
function (“maximum entropy formalism”). Specifically,
Optimise: -1*SUM(p_ilog(p_i)) for a vector p_i of probabilities,
conditional on a series of constraints of the form:
SUM(T_i*p_i)=k_i for given values of T_i and k_i (these are
constraints on
2002 Feb 19
1
Constrained optimisation
Hello,
I need to solve a non-linear optimization with non-linear constraints.
The 'nlm' routine does not seem to allow constraints. Is there a
package for solving such problems in R?
Thanks,
John.
--
==========================================
John Janmaat
Department of Economics
Acadia University, Wolfville, NS, B0P 1X0
(902)585-1461
All opinions stated are personal, unless
2008 Mar 12
1
constrained optimisation
Hi,
i have to optimise a function f(a,b), with a, b vectors in R^d such that a and b are orthogonal, that is a'b=0. Anybody has a suggestion?
Thanks, in advance, for your help,
Giovanna
_________________________________________________________________
[[elided Hotmail spam]]
[[alternative HTML version deleted]]
2010 Aug 24
1
Constrained non-linear optimisation
I'm relatively new to R, but I'm attempting to do a non-linear maximum
likelihood estimation (mle) in R, with the added problem that I have a
non-linear constraint.
The basic problem is linear in the parameters (a_i) and has only one
non-linear component, b, with the problem being linear when b = 0 and
non-linear otherwise. Furthermore, f(a_i) <= b <= g(a_i) for some
(simple) f
2011 Dec 19
1
None-linear equality constrained optimisation problems
Dear R users,
I have a problem. I would like to solve the following:
I have
pL = 1/(1+e^(-b0+b1))
pM = 1/(1+e^(-b0))
pH = 1/(1+e^(-b0-b1))
My target function is
TF= mean(pL,pM,pH) which must equal 0.5%
My non-linear constraint is
nl.Const = 1-(pM/pH), which must equal 20%, and would like the values of
both b0 and b1 where these conditions are met.
I have searched widely for an answer,
2009 Jun 03
1
Function in R for computing correlation matrix and covariance matrix
Hi,
At present, i have two distinct and real values for the coefficient, which is required in AR(2) model. Based on my revision, for distinct and real values of the coefficients in AR(2) model, the correlation structure separated by lag h can be computed by p(h) = a*z1^(-h) + b*z2^(h), where p(h) is the autocorrelation separated by lag h, a and b can be determined by initial values, z1 and z2
2009 Feb 05
2
Non-linear optimisation
Hi there,
I have a piece of Matlab code I use to optimise a trding strategy. If there
are any Matlab/R specialists out there, I would appreciate your help in
doing the exact same optimisation in R.
I suspect I would use nlm() in R but am not sure where to define my
constraints.
I have attached my Matlab code below for reference.
Many thanks.
Constraints
function [c,ceq]=TriskellConstraints(X)
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
2009 Jun 16
1
Constrained Optimization, a full example
After a few days of work, I think I nearly have it.
Unfortunately, theta is unchanged after I run this (as a script from a
file). I thought that theta would contain the fitted parameters.
The goal here is to find the least squares fit according to the function
defined as "rss" subject to the constraints defined as ui and ci.
I defined ui and ci to (hopefully) force par2 and par3
2011 Sep 08
3
global optimisation with inequality constraints
Dear All,
I would like to minimise a nonlinear function subject to linear inequality constraints as part of an R program. I have been using the constrOptim function. I have tried all of the methods that come with Optim, but nothing finds the correct solution. If I use the correct solution as the vector of starting values, though, my program does output the correct solution and optimum - the
2004 Sep 21
2
constrained optimization in R
R:
I need to minimize a function such that the parameters when used in
another function result in a particular value, which i fix. That is, I
need min(f(a,b)) given g(a,b)=X, where min(.) is the minimum, f(.) and
g(.) are functions (with unknown gradients) of parameters a and b and X is
a fixed value. What optimization function(s) in R do you suggest?
constrOptim looks like it will work
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
2008 Jul 08
2
Constrained optimization
i have a function like
1+sin(a+bx) where -pi/2<=a+bx<=pi/2
i made a progrom using constrOptim() function but it is not giving good
result. it depends on the initial value. but when i am doing simulation it
is impossible of find the best initial value for every step. also i am not
exactly sure how to input the restriction though i have read the help file
of the function. here x is a set of
2007 Apr 23
4
Estimates at each iteration of optim()?
I am trying to maximise a complicated loglikelihood function with the "optim" command. Is there some way to get to know the estiamtes at each iteration? When I put "control=list(trace=TRUE)" as an option in "optim", I just got the initial and final values of the loglikelihood, number of iterations and whether the routine has converged or not. I need to know the