Constrain regression coefficients to be equal

3 visualizaciones (últimos 30 días)
Femke R
Femke R el 18 de Oct. de 2020
Respondida: Jeff Miller el 18 de Oct. de 2020
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?

Respuesta aceptada

Jeff Miller
Jeff Miller el 18 de Oct. de 2020
Make a new variable with
IndependentSum = Independent1 + Independent2;
and then fit the model with
Dependent~IndependentSum

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by