Hi!
I'm trying to fit a linear model: y = a1*x1 + a2*x2 + a3*x3 + a4 + ε
where a1, a2, and a3 are positive, and a1 + a2 + a3 = 1. (I followed instructions here: https://www.stata.com/support/faqs/s...l-constraints/)
Currently I'm facing with two problems. First is that I want to use stepwise estimation to only keep significant variables in each regression(I have 900 regressions) but the "stepwise" command is not supportive for "nl" or "nlcom";
Second is that I want to export the "nlcom" results into excel file. I tried "outreg2" command but it didn't export correctly. (I wish it to be like a regression result, each regressions' results contained in one column)
Any method is appreciated. Thanks so much for your time!

I'm trying to fit a linear model: y = a1*x1 + a2*x2 + a3*x3 + a4 + ε
where a1, a2, and a3 are positive, and a1 + a2 + a3 = 1. (I followed instructions here: https://www.stata.com/support/faqs/s...l-constraints/)
Currently I'm facing with two problems. First is that I want to use stepwise estimation to only keep significant variables in each regression(I have 900 regressions) but the "stepwise" command is not supportive for "nl" or "nlcom";
Second is that I want to export the "nlcom" results into excel file. I tried "outreg2" command but it didn't export correctly. (I wish it to be like a regression result, each regressions' results contained in one column)
Any method is appreciated. Thanks so much for your time!