Multiple linear regression with excel data in Matlab

조회 수: 1 (최근 30일)
Betty
Betty 2017년 11월 27일
댓글: Betty 2017년 11월 27일
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
John D'Errico
John D'Errico 2017년 11월 27일
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 2017년 11월 27일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by