Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

How to create multiple linear regression ? NEED HELP

1 visualización (últimos 30 días)
Mr LE
Mr LE el 7 de Feb. de 2015
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Hi,
I would like to regress Q with 3 response functions X,Y and Z (like this Q=a+bX+cY+dZ) (Where Q, X, Y and Z are matrice [129x1])
Does anyone know what is the function that can I use for that?

Respuestas (1)

the cyclist
the cyclist el 8 de Feb. de 2015
If you have the Statistics Toolbox, you can do this with the mvregress function.
  2 comentarios
Mr LE
Mr LE el 8 de Feb. de 2015
Editada: the cyclist el 8 de Feb. de 2015
Thanks for your answer!
It works, I have the estimated coefficients of X, Y and Z but I don't have "a" in my regression
This is my code:
X=[g(1).b g(1).c g(1).d g(1).e]
for i=1:10
[h(i).mdl]=mvregress(g(i).DiffReturn,X,'algorithm','ecm');
end
the cyclist
the cyclist el 8 de Feb. de 2015
I believe you need to add a constant vectors of ones to your predictor matrix, to estimate the constant term:
X = [ones(129,1) g(1).b g(1).c g(1).d g(1).e]

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by