hello everyone
for a school assignment I need to perform a linear regression with some constraints
- the sum of the coefficients must be 1
- the coefficients must be greater than or equal to 0
- there should not be a constant term.
the first constraint succeeds and also the constant term is omitted but the constraint where the coefficients are greater than or equal to 0 fails.
Array
Does anyone have an idea how I can solve this?
many thanks in advance
Related Posts with constrained linear regression
Questions about teffects nnmatch & error use option osample()Dear Stata Community! I hope you can help me out with some of the questions I have regarding the ne…
Sortring in descending order in scatterplotsHi all, I am trying to build a two-way scatterplot having on the y axis values of a variable called…
SIR models in StataDear all, I have to estimate the equations of a SIR model to project the spread of an infectious di…
PSM (ATET and ATE)Hello all, I will please like an answer to this question. When calculating Average Treatment Effect…
Error naming output files from macroHello, looping over a series of input files, I want to create a series of output files and name the…
Subscribe to:
Post Comments (Atom)
0 Response to constrained linear regression
Post a Comment