Constrain regression coefficients to be equal
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi guys,
I'm working on a code where I want to compare multiple regression models, one completely free, and one where the regression coefficients of the IV's are constrained to be equal.
In R (lavaan package) I would be able to constrain them like this -- Dependent ~ coef * Independent1 + coef * Independent2 (just for reference)
How can I do this in Matlab?
댓글 수: 0
채택된 답변
Jeff Miller
2020년 10월 18일
Make a new variable with
IndependentSum = Independent1 + Independent2;
and then fit the model with
Dependent~IndependentSum
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!