similar to: Constrained non-linear optimisation

Displaying 20 results from an estimated 7000 matches similar to: "Constrained non-linear optimisation"

2000 Mar 31
2
linear models
Dear R users, I have a couple of linear model related questions. 1) How do I produce a fixed effect linear model using lme? I saw somewhere (this may be Splus documentation since I use Splus and R interchangeably) that using lme(...,random= ~ -1 | groups,...) works, but it gives the same as lme(...,random= ~ 1 | groups,...), ie. fits a random effect intercept term. The reason why I want to do
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
2006 Oct 21
2
problem with mode of marginal distriubtion of rdirichlet{gtools}
Hi all, I have a problem using rdirichlet{gtools}. For Dir( a1, a2, ..., a_n), its mode can be found at $( a_i -1)/ ( \sum_{i}a_i - n)$; The means are $a_i / (\sum_{i} a_i ) $; I tried to study the above properties using rdirichlet from gtools. The code are: ############## library(gtools) alpha = c(1,3,9) #totoal=13 mean.expect = c(1/13, 3/13, 9/13) mode.expect = c(0, 2/10, 8/10) #
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,
2012 Oct 18
7
summation coding
I would like to code the following in R: a1(b1+b2+b3) + a2(b1+b3+b4) + a3(b1+b2+b4) + a4(b1+b2+b3) or in summation notation: sum_{i=1, j\neq i}^{4} a_i * b_i I realise this is the same as: sum_{i=1, j=1}^{4} a_i * b_i - sum_{i=j} a_i * b_i would appreciate some help. Thank you. -- View this message in context: http://r.789695.n4.nabble.com/summation-coding-tp4646678.html Sent from the R
2003 Feb 19
4
fitting a curve according to a custom loss function
Dear R-Users, I need to find a smooth function f() and coefficients a_i that give the best fit to y ~ a_0 + a_1*f(x_1) + a_2*f(x_2) Note that it is the same non-linear transformation f() that is applied to both x_1 and x_2. So my first question is how can I do it in R? A more general question is this: suppose I have a utility function U(a_i, f()), where f() is say a spline. Is there a general
2008 Aug 11
3
R-help? how to take difference in next two elements
Hi, I'd like to take difference for a sequence a between a_i and a_i-2, for instance, a<-c(2,3,4,8,1) I need (2, 5, -3) as a result. If not using a for loop, can anyone help me? Thanks a lot. Dot -- View this message in context: http://www.nabble.com/R-help--how-to-take-difference-in-next-two-elements-tp18927968p18927968.html Sent from the R help mailing list archive at Nabble.com.
2013 Mar 22
1
Integration of vector syntax unknown
Hello, I'm very new to using R, but I was told it could do what I want. I'm not sure how best to enter the information but here goes... I'm trying to transfer the following integral into R to solve for ln(gamma_1), on the left, for multiple instances of gamma_i and variable N_i. gamma_i is, for example, (0, 0.03012048, 0.05000000, 0.19200000, 0.44000000, 0.62566845) N_i (N_1 or
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];
2000 Mar 20
1
CART and the `tree' contrib package
Dear R people, I was recently reading the book `Classification and Regression Trees' by Breiman. This book talks about the CART program. Both Splus and R have implementations of this. However, the book talks about the possibility of extending the existing `standard' set of questions (for continuous variables, these are of the form X < c where X is the variable, c some const) to
2008 May 16
1
Making slope coefficients ``relative to 0''.
I am interested in whether the slopes in a linear model are different from 0. I.e. I would like to obtain the slope estimates, and their standard errors, ``relative to 0'' for each group, rather than relative to some baseline. Explicitly I would like to write/represent the model as y = a_i + b_i*x + E i = 1, ..., K, where x is a continuous variate and i indexes groups (levels of a
2005 Sep 21
2
Help on optim
Dear R-help, I am new to optim function and need some help with optimization. Problem description: I am trying to optimize a weights vector such that it produce maximum value for a function maxVal. The optimization is subjected to constraint. The constraints are a) Min weight should be greater than or equal to Zero. b) Max weight should be less than or equal to 1 c) Sum of the
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
2001 May 23
2
help: exponential fit?
Hi there, I'm quite new to R (and statistics), and I like it (both)! But I'm a bit lost in all these packages, so could someone please give me a hint whether there exists a package for fitting exponential curves (of the type t --> \sum_i a_i \exp( - b_i t)) on a noisy signal? In fact monoexponential decay + polynomial growth is what I'd like to try. Thanks in advance,
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
2011 Dec 19
2
Constrained Optimisation
Dear All I have a constrained optimisation problem, I want to maximise the following function t(weights) %*% CovarianceMatrix %*% weights for the weights, subject to constraints on each element within the weights & the weights vector summing to 1. i.e. weights = (x1, x2, x3), where x1 is within some given range (a +b, a - b). I have tried to do this using the optim function in R,
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]]
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 Sep 28
0
constrained logistic regression: Error in optim() with method = "L-BFGS-B"
Dear R Users/Experts, I am using a function called logitreg() originally described in MASS (the book 4th Ed.) by Venebles & Ripley, p445. I used the code as provided but made couple of changes to run a 'constrained' logistic regression, I set the method = "L-BFGS-B", set lower/upper values for the variables. Here is the function, logitregVR <- function(x, y, wt =