My objective function is a variant of ordinary linear least squares, by which I mean estimating regression coefficients B[1],…,B[p] by minimizing

```
sum((Y[i]-sum( X[i,j]*B[j] for j=1:p))^2 for i=1:n)
```

where Y[1],…,Y[n] are n observations and X is an n by p regression matrix.

My problem is a variant on the above by introducing binary decision variables G[1],…,G[p]

```
sum((Y[i]-sum( X[i,j]*B[j]*G[j] for j=1:p))^2 for i=1:n)
```

The difference is that each regression coefficient B[i] is preceded by a binary 0-1 decision variable G[i].

I believe this problem to fall into the MINLP category, and I have referenced the list of solvers which support this type of optimization, but have not been able to get it to work so far.

I have set up my model as follows

```
m = Model(solver=some_solver())
@variable(m, G[1:p], Bin)
@variable(m, B[1:p])
@NLobjective(m, Min, sum((Y[i]-sum( X[i,j]*B[j]*G[j] for j=1:p))^2 for i=1:n))
solve(m)
```

where I have experimented with various values of some_solver() but have always received some error message.

Can someone please advise me if I have correctly identified this as an MINLP problem and if so advise me what solver would work well? Also please advise if I have implemented it correctly.

Much appreciated!