Multiple linear regression with excel data in Matlab

1 Ansicht (letzte 30 Tage)
Betty
Betty am 27 Nov. 2017
Kommentiert: Betty am 27 Nov. 2017
I'm trying to do a multiple linear regression to predict my (Y) column. I have imported my data from excel and have a 10x8 double matrix. How can I predict 1(Y) when having 6(X)? (my first column is not important in this matter as it's number going from 1-10.)
I want to use this function: [b,bint,r] = regress(y,X)
Hope this makes sense.
  2 Kommentare
John D'Errico
John D'Errico am 27 Nov. 2017
10 data points, 6 independent variables as predictors, plus a constant probably in the model.
Have you tried using regress? It is what you want to use. It will be a complete waste of time because you have almost certainly wildly too little data. But you can use regress.
READ THE HELP FOR REGRESS. How will us retyping the documentation for regress make it any easier for you to use?
As I said, you have too little data to generate a useful model. But if you really want to compute useless garbage in the form of a model, go for it.
Betty
Betty am 27 Nov. 2017
I have larger data with 330x8 including 33 subjects, but I wanted to try it on the first one to test if it was working.
Any ideas how to code it now? I used xlread so I have all my data in my workspace.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by