Displaying 20 results from an estimated 2000 matches similar to: "nonlinear programming package"
2010 Sep 17
1
Nonlinear programming problem
Hello useRs,
I'm using the command "solnp" in package "Rsolnp" to solve a general nonlinear programming problem. But I got an error that " the leading minor of order 15 is not positive definite
". Can anybody tell what may cause this error? Does it have something to do with the starting values?
Thanks a lot!!!
Xiaoxi
[[alternative HTML version
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];
2010 Nov 08
4
Random Sample
Hello R users,
Here is my question about generating random sample. How to set the random seed to recreate the same random numbers? For example, 10 random numbers is generated from N(0,1), then "runif(10)" is used.What if I want to get the same 10 random numbers when I run runif(10) again? Is it possible?I think .Random.seed should be used here.
Thanks.
Xiaoxi
[[alternative
2009 Sep 03
3
Rdonlp2 package question
Previous versions have this question have partially bounced.
I apologize if parts of this are showing up multiple times on the
list.
Another try ...
There was at one time an R package called Rdonlp2 for solving
constrained nonlinear programming problems. Both the objective
function
and the constraints could be nonlinear in the decision variables.
The package is no longer in the CRAN list.
2009 May 21
2
good numerical optimization to use in R?
Hi all,
Could anybody point me to a good/robust numerical optimization program
to use in R?
I am doing some MLE fitting. Thanks!
2011 Mar 23
1
< ABOUT Rdonlp2 package >
I can't load Rdonlp2 package. Please support me.
Thanks
------------------------------------
Thien An
Ho Chi Minh city - VIET NAM
[[alternative HTML version deleted]]
2009 Jul 03
2
Error using the Rdonlp2 Package
Dear experts,
I'm attempting to solve a constrained optimization problem using the Rdonlp2
package.
I created a Lagrange function (L=f(x)-lambda(g(x)-c)), where x is a vector
of 16 parameters. This is what I'm using as objective function in the code
below. In addition, I set bounds on these parameters (par.u and par.l). When
I run the code, I get the error message shown below. Any idea
2010 Feb 17
2
non-linear contrained optimization
All,
I have searched the previous help boards and discovered the problem
with Rdonlp2 - Specifically, its non-availability. I thought that this
was my solution, but perhaps there is a better way that you all could
help me with. I imagine that this problem is trivial to people such
as the experts on this mailing list.
I am trying to solve this problem over and over again in a simulation:
2009 Mar 27
1
constraint optimization: solving large scale general nonlinear problems
Hi
I need advice regarding constraint optimization with large number of
variables.
I need to solve the following problem
max f(x1,...,xn)
x1,..xn
x1=g1(x1,...,xn)
.
.
xn=gn(x1,...,xn)
I am using Rdonlp2 package which works well until 40 variables in my
case. I need to solve this problem with over 300 variables. In this case
Rdonlp2 is very very slowly. I know
2012 Jul 18
4
The best solver for non-smooth functions?
# Hi all,
# consider the following code (please, run it:
# it's fully working and requires just few minutes
# to finish):
require(CreditMetrics)
require(clusterGeneration)
install.packages("Rdonlp2", repos= c("http://R-Forge.R-project.org",
getOption("repos")))
install.packages("Rsolnp2", repos= c("http://R-Forge.R-project.org",
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]]
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 Nov 28
1
Regarding posting a package to R-forge (with one of the dependent packages not in CRAN)
Hi Guys,
Recently I wrote a package for dealing with Markov Switching Regressions in
R and it is included in the Rmetrics project.
https://r-forge.r-project.org/projects/rmetrics/
Everything works fine when I use it in computer.
But, the package depends on the use of optimization functions from the
package Rdonlp2, which is not available on CRAN.
So, if I have Rdonlp2 in my laptop (or any
2008 Aug 19
1
nonlinear constrained optimization
Hi. I need some advises on how to use R to find pi (i is the index) with
the following objective function and constraint:
max (sum i)[ f(ai, bi, pi) * g(ci, di, pi) * Di ]
s.t. (sum i)[ f(ai, bi, pi) * Di * pi] / (sum i)[ f(ai, bi, pi) * Di ] <=
constant
f and g are diffentiable.
So, I am thinking of optim with method = "BFGS"? But wonder how to include
the
2009 Jan 28
2
constrainOptim
Dear R helpers
I have a question regarding the constrainOptim.
I'm coding the nested logit and would like to set a bound of rho to (0,1] as an extreme value distribution where rho = exp(lambda)/1+exp(lambda)
I wonder if I can do that directly in optim (say rho > 0 & <= 1) or need to use constrainOptim
I read the help but still don't know how to set ui and ci
Thanks,
June
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)
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))
2009 Feb 05
1
optimal control, maximization with several variables?
Dear all,
I would like to solve the following problem, which can be done with optimal control theory or dynamic programming:
max(x,y) a*u1+b*u2+c*f1(u2) s.t. 0<u1<x, 0<u2<f2(x,u2), x'=f3(u1,u2,x)
which can be rewritten if optimal control theory should be applied as
H=a*u1+b*u2+c*f1(u2)+lambda*(x') s.t. 0<u1<x, 0<u2<f2(x,u2)
The maximum principle
2018 May 04
0
adding overall constraint in optim()
On Thu, May 3, 2018 at 2:03 PM, Michael Ashton
<m.ashton at enduringinvestments.com> wrote:
> Thanks Bert. But everyone on that forum wants to use finance tools rather than general optimization stuff! And I am not optimizing a traditional Markowitz mean-variance problem. Plus, smarter people here. :-)
>
I'm very confused by these statements. Most of the "finance tools"
2018 May 03
2
adding overall constraint in optim()
Thanks Bert. But everyone on that forum wants to use finance tools rather than general optimization stuff! And I am not optimizing a traditional Markowitz mean-variance problem. Plus, smarter people here. :-)
> On May 3, 2018, at 3:01 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote:
>
> You can't -- at least as I read the docs for ?optim (but I'm pretty
> ignorant