# [R] Linear optimization with quadratic constraints

Preetam Pal lordpreetam at gmail.com
Sat Jan 7 12:26:58 CET 2017

```Hi Guys,
Regards,
Preetam

On Thu, Jan 5, 2017 at 4:09 AM, Preetam Pal <lordpreetam at gmail.com> wrote:

> Hello guys,
>
> The context is ordinary multivariate regression with k (>1) regressors,
> i.e. *Y = XB + Error*, where
> Y = n X 1 vector of predicted variable,
> X = n X (k + 1) matrix of regressor variables(including ones in the first
> column)
> B = (k+1) vector of coefficients, including intercept.
>
> Say, I have already estimated B as B_hat = (X'X)^(-1) X'Y.
>
> I have to solve the following program:
>
> *minimize f(B) = LB*   ( L is a fixed vector 1 X (k+1)   )
> such that:
> *[(B-B_hat)' * X'X * (B-B_hat) ] / [ ( Y - XB_hat)' (Y - XB_hat) ] *  is
> less than a given value *c*.
>
> Note that this is a linear optimization program *with respect to B* with
>
> I don't understand how we can solve this optimization - I was going
> through some online resources, each of which involve manually computing
> gradients of the objective as well as constraint functions - which I want
> to avoid (at least manually doing this).
>
>
> would be:
>
>    - X and Y
>    - B_hat
>    - L
>    - c
>
>
> Please let me know if any further information is required - the set-up is
> pretty general.
>
> Regards,
> Preetam
>

--
Preetam Pal
(+91)-9432212774
M-Stat 2nd Year,                                             Room No. N-114
Statistics Division,                                           C.V.Raman
Hall
Indian Statistical Institute,                                 B.H.O.S.
Kolkata.

[[alternative HTML version deleted]]

```