Missing Observations error when running regression
Mostrar comentarios más antiguos
I am using MATLAB to complete some regression analysis,
Say I have 40 variables, 35 have the full dataset, monthly data from 1950-2010,
However, some have missing values at the start of the data set,
For example, 36 may only have 1969-2010, 27 1952-2010,
I tried to replace all blanks with a NaN and got the error message,
"Error using svd Input to SVD must not contain NaN"
Is there something I can do?
1 comentario
Sam P
el 6 de Jun. de 2018
Respuestas (1)
Shrestha Kumar
el 6 de Jun. de 2018
0 votos
Hi,
You can replace NaN with the mean of the data in the column(if it is a numerical value else take the mode). Also, NaN values can be present in the test data, so take care of that too.
Categorías
Más información sobre Linear Regression en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!