similar to: Constrained Optimization

Displaying 20 results from an estimated 1000 matches similar to: "Constrained Optimization"

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];
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] + ... +
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
2010 Jul 07
4
constrained optimization
Dear list, The task view on optimization does not reference a package for non linear constrained optimization problems. Stefan Theussl told me to look at the Rsolnp package, but unfortunately it is not very clear what method is R ported. (The authors ported the matlab code of Yinyu Ye http://www.stanford.edu/~yyye/ <http://www.stanford.edu/%7Eyyye/>) Currently I'm looking for an
2011 Dec 20
1
constrOptim and problem with derivative
Dear List, I am using constrOptim to solve the following fr1 <- function(x) { b0 <- x[1] b1 <- x[2] ((1/(1+exp(-b0+b1))+(1/(1+exp(-b0)))+(1/(1+exp(-b0-b1)))))/3 } As you can see, my objective function is ((1/(1+exp(-b0+b1))+(1/(1+exp(-b0)))+(1/(1+exp(-b0-b1)))))/3 and I would like to solve for both b0 and b1. If I were to use optim then I would derive the gradient of the
2011 Dec 21
1
constrOptim and further arguments
Dear List, I have the code below, where I am using the constrained optimisation package, 'constrOptim.nl' to find the values of two values, b0 and b1. I have no problems when I enter further variable information DIRECTLY into the functions, fn, and heq. In this instance I require fn to have -0.0075 appended to it, and in the case of heq, h[1] has -0.2. library(alabama)
2003 Oct 29
1
constrOptim doesn´t send arguments to optim!(?)
Hi, I think that there something wrong with the 'constrOptim' max/minimization function because she doesn?t send extra arguments to 'optim' call. Fact: When I use optim in a f(x,theta)-like function, everything goes ok. But using constrOptim with the same function leads to error... Proof: Make a small change in the 'Rosenbrock Banana function' (taken from the Examples
2007 Sep 10
2
Are the error messages of ConstrOptim() consisten with each other?
Dear Friends. I found something very puzzling with constOptim(). When I change the parameters for ConstrOptim, the error messages do not seem to be consistent with each other: > constrOptim(c(0.5,0.3,0.5), f=fit.error, gr=fit.error.grr, ui=ui,ci=ci) Error in constrOptim(c(0.5, 0.3, 0.5), f = fit.error, gr = fit.error.grr, : initial value not feasible > constrOptim(c(0.5,0.9,0.5),
2009 Nov 18
1
bug in '...' of constrOptim (PR#14071)
Dear all, There appears to be a bug in how constrOptim handles ... arguments that are suppose to be passed to optim, according to the documentation. This means you can't get the hessian to be returned, for example (so this is a real problem, and not just a question of mistaken documentation). Looking at the code, it appears that a call to the user-defined f includes the ..., when the ...
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
2008 May 28
1
Can plot() be used for multiple plots?
Greetings helpRs -- I would like to use plot() to plot two cumulative distribution curves so that a user of the plot can compare the distributions of the two variables. The following code draws two distributions separately, but I cannot find the instruction necessary to add a second cumulative distribution to the first one. Any suggestion would be very welcome. x1 <-
2007 Sep 09
2
What does it mean by "initial value not available"?
Dear friends. I use ConstrOptim( ) and got error message "initial value not available". My understanding of "initial value not available" is that one of the following 3 cases happens: 1.The objective function is not well defined at the point of the initial value. 2. The differentiation of the objective function is not well defined at the point of the initial value. 3. The
2010 Feb 25
1
multicore in R
Hi, i have a function: zz<- (constrOptim(c(.5,0), fr, grr, ui=rbind(c(-1,0),c(1,-1)), ci=c(-0.9,0.1))) i can get the result by using command (for example): zz$par now if i can use multicore: zz<-parallel(constrOptim(c(.5,0), fr, grr, ui=rbind(c(-1,0),c(1,-1)), ci=c(-0.9,0.1))) result < collect(zz) i cant get my the result: result$par because multicore add process id. for example:
2011 Nov 17
1
Vectorizing for weighted distance
Hi All, I am trying to convert the following piece of matlab code to R: XX1 = sum(w(:,ones(1,N1)).*X1.*X1,1); #square the elements of X1, weight it and repeat this vector N1 times XX2 = sum(w(:,ones(1,N2)).*X2.*X2,1); #square the elements of X2, weigh and repeat this vector N2 times X1X2 = (w(:,ones(1,N1)).*X1)'*X2; #get the weighted 'covariance'
2002 Jun 28
1
Problem in optim(method="L-BFGS-B") (PR#1717)
Full_Name: Jörg Polzehl Version: 1.5.1 OS: Windows 2000 Submission from: (NULL) (193.175.148.198) When calculating MLE's in a variance component model using constrained optimization, i.e. optim(...,method="L-BFGS-B",...) I observed an inproper behaviour in cases where the likelihood function was evalueted at the constraint. Parameters and value of the function at the constraint
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>
2011 Sep 02
5
Hessian Matrix Issue
Dear All, I am running a simulation to obtain coverage probability of Wald type confidence intervals for my parameter d in a function of two parameters (mu,d). I am optimizing it using "optim" method "L-BFGS-B" to obtain MLE. As, I want to invert the Hessian matrix to get Standard errors of the two parameter estimates. However, my Hessian matrix at times becomes
2007 Oct 26
1
Fwd: Ajuda em R
An embedded and charset-unspecified text was scrubbed... Name: n?o dispon?vel Url: https://stat.ethz.ch/pipermail/r-help/attachments/20071026/5710517e/attachment.pl
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
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