How can I fix my issue with regstats "design matrix has more predictor variables than observations"?

1 visualización (últimos 30 días)
Hi, I'm getting this error from regstats and I'm not sure what it means or how to fix it. Any advice would be appreciated.
Thank you!

Respuestas (1)

John D'Errico
John D'Errico el 17 de Nov. de 2022
Editada: John D'Errico el 17 de Nov. de 2022
Get more data. Simple enough.
Supose you want to fit a very simple linear model with say three independent variables. With a constant term in there, you have 4 parameters.
w = a + b*x + c*y + d*z
In order to estimate all 4 unknown parameters, you NEED at least 4 data points. Effectively, there are 4 degrees of freedom in this model. To have even a chance to infer those parameters, even in the presence of zero noise, you would need 4 data points or more. More is a VERY good idea. Each data point is one piece of information.
So it is simple. GET MORE DATA. How much more you need depends on the signal to noise ratio in your data.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by