I am performing a linear regression and what I need is (1) to constrain the sum of the regression coefficients to 1, and (2) to constrain the sum of regression coefficients to 1 AND each regression coefficient to be non-negative. For each case, I need the standard error, t-stat and p values for each regression coefficient as it appears in an unconstrained linear regression.
I have tried the solve.QP command and I get correct results but I do not get the t-stat and p-values as in a linear regression How do I fit a constrained regression in R so that coefficients total = 1? I have looked at the "constreg" command in "coneproj" package and I am not successful. Should I try the nls command? I am not sure on how to add a constraint(s) to it. And also the fact that the formula is for a linear regression.
Thank you very much for your help and support. Supratim