similar to: How to plot a Quadratic Model?

Displaying 20 results from an estimated 6000 matches similar to: "How to plot a Quadratic Model?"

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,
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
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
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:
2009 Sep 20
2
Quadratic Constraints
HI All, I am unable to solve a optimization Problem Please Help Me out of this to solve. The Optimization problem is as follows :- My objective function is linear and one of the constraint is quadratic. Min z = 5 * X1 + 9* X2 + 7.15 *X3 + 2 * X4 subject to X1 + X2 + X3 +X4 = 9 X1 + X4 < = 6.55 X3(X3 - 3.5) >=0 X1,X2,X3,X4 >=0 Now the problem is how to solve this kind of
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
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
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
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
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}}
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
2005 Jul 19
2
Taking the derivative of a quadratic B-spline
Hello, I have been trying to take the derivative of a quadratic B-spline obtained by using the COBS library. What I would like to do is similar to what one can do by using fit<-smooth.spline(cdf) xx<-seq(-10,10,.1) predict(fit, xx, deriv = 1) The goal is to fit the spline to data that is approximating a cumulative distribution function (e.g. in my example, cdf is a 2-column matrix with x
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
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
2008 Feb 15
2
Quadratic Programming
Hi, I am using solve.QP (from quadprog) to solve a standard quadratic programming problem: min_w -0.5*w'Qw st ... I would like solve.QP to do two things: 1) to start the optimization from a user-supplied initial condition; i.e., from a vector w_0 that satisfies the constraints, and 2) to return the values of the lagrange multiplieres associated with the constraints. I did not find an obvious
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
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
2011 Apr 11
2
Plotting a quadratic line on top of an xy scatterplot
Dear Listserv, Here is my latest in a series of simple-seeming questions that dog me. Consider the following data: x <- read.table(textConnection("temperature probability 0.11 9.4 0 2.3 0.38 8.7 0.43 9.2 0.6 15.6 0.47 8.7 0.09 12.8 0.11 9.4 0.01 7.7 0.83 8 0.65 9.3 0.05 7.4 0.34 10.1 0.02 4.8 0.07 9.1 0.6 15.6 0.01 8.4 0.9 9.6 0.83 8 0.12 8.4 0.01 8 0 5 0.11 9.7 0.41 7.4 0.05 9.4 0.09
2002 Aug 21
4
Quadratic optimization problem
I hope that someone can help me with the following question: I would like to solve the Markowitz optimization problem WITH short-sale constraints. Maybe a procedure to solve a quadratic optimization problem with convex constraints and positive variables is already implemented in R? Thank you very much, edg -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help
2005 Nov 03
7
quadratic form
On page 22 of the R-introduction guide it's written: the quadratic form x^{'} A^{-1} x which is used in multivariate computations, should be computed by something like x%*%solve(A,x), rather than computing the inverse of A. Why isn't it good to compute t(x) %*% solve(A) %*% x? Thanks a lot for help!