2

I have got to estimate a model using R of the form:

y=a1*X1+a2*X2+a3*X3

I need to impose the following restrictions:

a1, a2, a3>0

and

a1+a2+a3=1

I already have the inputs in a matrix called X(ncol=3) Can anyone inform me about which code to use?

Apurva
  • 7,871
  • 7
  • 40
  • 59

0 Answers0