Multivariate Statistical analysis, regression? correlation?

조회 수: 27 (최근 30일)
In-chan Kim
In-chan Kim 2020년 3월 12일
답변: Sourabh Kondapaka 2020년 3월 24일
Hi, my statistics is not my strongest.
What's the best method for analysing for the effects of different variables on the output results?
I want to see how the variables in the graphs such as total duration of trips, total distance etc affect the results OF and benefit comp. See if some of them effect the results more than others.
Thanks!

답변 (1개)

Sourabh Kondapaka
Sourabh Kondapaka 2020년 3월 24일
The best approach would be to use Correlation when analyzing effect of a specific variable on another variable.
The function "Corrcoef()" can be used to get the correlation between all columns or for a specific column.
If your data is in the form of a matrix, say matrix A:
R = corrcoef(A)
% R is a matrix of correlation coefficients for A, where the columns of A
% represent random variables and the rows represent observations
R = corrcoef(A,B)
% R is matrix of coefficients between two random variables A and B.
After obtaining the correlation matrix. You can check for the specific column which is the result variable.
In your case it is “OF”. Check the column “OF” against each of the rows.
If your data is in the form of a table instead of a matrix then you can use the “corr()“ function. Here “X” is the table.
R = corr(X{:,:});
% Or you could use :
R = corr(X.Variables);
For reference on corrcoef() function :
For reference on how correlation coefficients are calculated:
In case you want to visualize / plot the correlation matrix, you can use “corrplot()” function.
For reference on corrplot() function :

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by