NaNs and regress lead to error?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Dear MATLAB experts,
I'm conducting multiple regressions with the function:
regress
In some of the regressions, data of the dependent variable is missing. And as I have read in the documentation, 'regress' removes all rows that contain NaNs. I was wondering if the corresponding rows of the independent variable will be removed, as the independent variable is formed by the same number of rows as the dependent variable in each regression. In any case, would this also lead to estimation errors?
Edit: imputing the missing values is not an option
I would really appreciate your help, since this is urgent for a project.
Thank you in advance
2 comentarios
Respuestas (1)
Prince Kumar
el 24 de Nov. de 2021
Hi Chiefjia,
Yes, if the rows contains NaNs, then the corresponding rows of independent variable will also be removed. This means that your training data would reduce.
0 comentarios
Ver también
Categorías
Más información sobre Linear Regression en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!