Constrain regression coefficients to be equal

1 回表示 (過去 30 日間)
Femke R
Femke R 2020 年 10 月 18 日
回答済み: Jeff Miller 2020 年 10 月 18 日
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?

採用された回答

Jeff Miller
Jeff Miller 2020 年 10 月 18 日
Make a new variable with
IndependentSum = Independent1 + Independent2;
and then fit the model with
Dependent~IndependentSum

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear and Nonlinear Regression についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by