Displaying 20 results from an estimated 5000 matches similar to: "Quadratic Constraints"
2007 Dec 22
1
using solve.qp without a quadratic term
I was playing around with a simple example using solve.qp ( function is in the quadprog package ) and the code is below. ( I'm not even sure there if there is a reasonable solution because I made the problem up ).
But, when I try to use solve.QP to solve it, I get the error that D in the quadratic function is not positive
definite. This is because Dmat is zero
because I don't have a
2008 May 12
1
Quadratic Constraints
Hi R,
A quick question.... How can I optimize the objective function
constrained to quadratic constraints? Which function of R is useful for
quadratic constraints?
Many Thanks,
Shubha
This e-mail may contain confidential and/or privileged i...{{dropped:13}}
2012 Aug 03
0
Binary Quadratic Opt
Hi Bert,
I won't post any more messages on this thread as problem has shifted from Optimization in R to Graph Algorithms.
Rest fine
Khris.
On Aug 2, 2012, at 9:13 PM, Bert Gunter [via R] wrote:
> This discussion needs to be taken off (this) list, as it appears to
> have nothing to do with R.
>
> -- Bert
>
> On Thu, Aug 2, 2012 at 2:27 AM, khris <[hidden email]>
2012 Jan 02
2
quadratic programming-maximization instead of minization
Hi, I need to maximize a quadratic function under constraints in R.
For minimization I used solve.QP but for maximization it is not useful since
the matrix D of the quadratic function
should be positive definite hence I cannot simply change the sign.
any suggestion ?
thanks
--
View this message in context:
2012 Jun 13
3
How to plot linear, cubic and quadratic fitting curve in a figure?
Hi R experts,
Could you please help me to fit a linear, cubic and quadratic curve in a figure? I was trying to show all these three fitting curves with different colour in one figure.
I spent substantial time to figure it out, but I could not.
I have given here a example and what I did for linear, but no idea for cubic and quadratic fitting curve
> dput(test)
structure(list(sp = c(4L, 5L,
2003 Jan 21
1
(v2) quadratic trends and changes in slopes (R-help digest, Vol 1 #52 - 16 msgs)
-----Original Message-----
Message: 6
Date: Mon, 20 Jan 2003 01:11:24 +0100
From: Martin Michlmayr <tbm at cyrius.com>
To: r-help at stat.math.ethz.ch
Subject: [R] quadratic trends and changes in slopes
I'd like to use linear and quadratic trend analysis in order to find
out a change in slope. Basically, I need to solve a similar problem as
discussed in
2009 Nov 08
2
linear trend line and a quadratic trend line.
Dear list users
How is it possible to visualise both a linear trend line and a quadratic trend line on a plot
of two variables?
Here my almost working exsample.
data(Duncan)
attach(Duncan)
plot(prestige ~ income)
abline(lm(prestige ~ income), col=2, lwd=2)
Now I would like to add yet another trend line, but this time a quadratic one. So I have two
trend lines. One linear trend line
2005 May 01
3
Roots of quadratic system.
Hello,
I have a system of quadratic equations (results of a Hamiltonian optimization)
which I need to find the roots for. Is there a package and/or function which
will find the roots for a quadratic system? Note that I am not opimizing, but
rather solving the first order conditions which come from a Hamiltonian. I am
basically looking for something in R that will do the same thing as fsolve in
2009 Oct 05
2
How to plot a Quadratic Model?
Good day for all,
I'm a beginner aRgonaut, thus I'm having a problem to plot a quadratic model
of regression in a plot.
First I wrote:
>plot(Y~X)
and then I tried:
>abline(lm(Y~X+I(X^2))
but "abline" only uses the first two of three regression coefficients, thus
I tried:
>line(lm(Y~X+I(X^2))
but a message error is showed ("insufficient observations").
2010 Dec 04
1
Quadratic programming with semi-definite matrix
Hello.
I'm trying to solve a quadratic programming problem of the form min
||Hx - y||^2 s.t. x >= 0 and x <= t using solve.QP in the quadprog
package but I'm having problems with Dmat not being positive definite,
which is kinda okay since I expect it to be numerically semi-definite
in most cases. As far as I'm aware the problem arises because the
Goldfarb and Idnani method first
2009 Sep 22
2
Semi continous variable- define bounds using lpsolve
How to define bounds for a semi continous variable in lp_solve.
Min 5x1 +9x2 +7.15x3 +0.1x4
subject to
x1+x2+x3+x4=6.7
x1+x4 <= 6.5
And x3 can be 0 or greater than 3.6
hence x3 is a semi continous variable
how to define bounds as well as semicontinous function because using
set.semicont and set. bound simantaneously doesn't seem to work.Thanks in
advance for the help
--
View this
2017 Jul 13
0
How to formulate quadratic function with interaction terms for the PLS fitting model?
Below.
-- Bert
Bert Gunter
On Thu, Jul 13, 2017 at 3:07 AM, Luigi Biagini <luigi.biagini at gmail.com> wrote:
> I have two ideas about it.
>
> 1-
> i) Entering variables in quadratic form is done with the command I
> (variable ^ 2) -
> plsr (octane ~ NIR + I (nir ^ 2), ncomp = 10, data = gasTrain, validation =
> "LOO"
> You could also use a new variable
2013 May 05
1
slope coefficient of a quadratic regression bootstrap
Hello,
I want to know if two quadratic regressions are significantly different.
I was advised to make the test using
step 1 bootstrapping both quadratic regressions and get their slope
coefficients.
(Let's call the slope coefficient *â*^1 and *â*^2)
step 2 use the slope difference *â*^1-*â*^2 and bootstrap the slope
coefficent
step 3 find out the sampling distribution above and
2005 Jan 19
0
Quadratic constraints
Hello,
I have a linear problem with quadratic constraints but i have no idea
about what package to use... any help?
Thanks in advance
2008 Jan 21
0
constrOptim for quadratic constraints?
Hi,
Can I use "constrOptim" for quadratic constraints? If not, which
optimizer can I go for?
BR, Shubha
This e-mail may contain confidential and/or privileged i...{{dropped:13}}
2008 May 22
1
Plotting a Quadratic...
I have an equation describing the best-fit model for a set of points (just 2
axes) that is in the form:
y=b+mx+px^2
Where b is the intercept, m is the slope describing a linear term, and p is
a slope of the quadratic term.
I would like to plot this equation on a curve (I know the equation is
y=(.1766x^2)+(.171x)+.101) on the original scatterplot. Any easy way to plot
this equation and
2013 May 03
1
R package for bootstrapping (comparing two quadratic regression models)
Hello ,
I want to compare two quadratic regression models with non-parametric
bootstrap.
However, I do not know which R package can serve the purpose,
such as boot, rms, or bootstrap, DeltaR.
Please kindly advise and thank you.
Elaine
The two quadratic regression models are
y1=a1x^2+b1x+c1
y1= observed migration distance of butterflies()
y2=a2x^2+b2x+c2
y2= predicted migration distance of
2006 Nov 26
2
Quadratic Optimization
Hi,
I need to solve an optimization problem in R having linear objective function and quadratic constraints(number of variables is around 80). What are the possible choices to do this in R.
optim() function only allows box constrained problems. Is it possible in nlm()? Or please tell me if there is any other routine.
Thanks
Amit
2017 Jul 13
3
How to formulate quadratic function with interaction terms for the PLS fitting model?
I have two ideas about it.
1-
i) Entering variables in quadratic form is done with the command I
(variable ^ 2) -
plsr (octane ~ NIR + I (nir ^ 2), ncomp = 10, data = gasTrain, validation =
"LOO"
You could also use a new variable NIR_sq <- (NIR) ^ 2
ii) To insert a square variable, use syntax I (x ^ 2) - it is very
important to insert I before the parentheses.
iii) If you want to
2017 Jul 16
0
How to formulate quadratic function with interaction terms for the PLS fitting model?
??
If I haven't misunderstood, they are completely different!
1) NIR must be a matrix, or poly(NIR,...) will fail.
2) Due to the previously identified bug in poly, degree must be
explicitly given as poly(NIR, degree =2,raw = TRUE).
Now consider the following example:
> df <-matrix(runif(60),ncol=3)
> y <- runif(20)
> mdl1 <-lm(y~df*I(df^2))
> mdl2