How can I fix my issue with regstats "design matrix has more predictor variables than observations"?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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!
0 Commenti
Risposte (1)
John D'Errico
il 17 Nov 2022
Modificato: John D'Errico
il 17 Nov 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.
0 Commenti
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!