Hi,
I am attempting to perform a linear regression on this equation: https://i.imgur.com/OJ32IUk.jpeg

I am trying to maximise compensated wins subject to a budget constraint for X (the sum of all X values has to be below a budget constraint of $200,000,000). I have all the coefficients for a(hat)_global, a(hat)uni and beta(hat)uni (in excel, I'm not sure the best format to import it into stata to do this), and I have minimum values in dollars for each of the values of X_t,i (they are different values for different X's). Is there any way to assign each extra dollar to the X_i with the largest marginal gain in Compensated Wins for that extra dollar, and keep assigning each extra dollar to the X with the largest marginal gain until the sum of all X's reaches the budget constraint?


I have looked for a way to do this but I cannot find anything.

Thanks in advance



Crossposted on reddit: https://www.reddit.com/r/stata/comme...d01/?context=3