Variable length & Stepwise regression
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Yaojiayin
el 18 de Sept. de 2014
Comentada: Yaojiayin
el 19 de Sept. de 2014
I want to create a dataset
A = dataset('File',Araa06.txt');
Matlab returens errors:
Misuse dataset/readFile (line 207) Variable lengths must all be the same.
Error dataset (line 351) a = readFile(a,fileArg,otherArgs)
What could be the problem?
If I want to use dataset A for stepwise regression
mdl=stepwiselm(A,'Predictor variables','DEM','grad','Response variable','Yield')
What is the different between this one and
stepwise
If I just want to do stepwise regression, do I really need to build a model?
0 comentarios
Respuesta aceptada
Roger Wohlwend
el 19 de Sept. de 2014
If you copy the contents of your txt-file and paste it into an Excel file, you see that not all numbers are separated by a tab. Some are separated by blanks. I guess that is why Matlab cannot read the txt file properly. It expects all numbers to be separated by tabs. So you have to fix the txt file first.
For stepwise regression you can use either stepwiselm or stepwise. They are basically the same. The latter offers you a GUI, the first is a class. I would recommend stepwiselm. You don't need a GUI. Just work with the class.
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!