correlation coefficient for a non-linear fit

조회 수: 10 (최근 30일)
Mariana
Mariana 2011년 2월 1일
댓글: Ameen Bassam 2021년 7월 27일
Does anyone know how to compute the correlation coefficient between two vectors, which are not linearly correlated? At the moment, I use a polynomial fit (order 3) between two vectors. It seems that corrcoeff compute it only for linear fits. Thanks a lot!

답변 (4개)

the cyclist
the cyclist 2011년 2월 1일
There are several options for correlation coefficients besides Pearson's (which is probably the most commonly used). Did you want to compute Kendall's tau or Spearman's rho? If so, then you can use the function CORR, and set the appropriate parameter. If that's not what you want, you'll need to supply some more details. (You might try searching the File Exchange, as well.)

Richard Willey
Richard Willey 2011년 2월 2일
Hi Marina
You might find the following blog posting of interest. (It shows some interesting ways to use Curve Fitting Toolbox)
http://blogs.mathworks.com/loren/2011/01/13/data-driven-fitting/

Mariana
Mariana 2011년 2월 2일
Thanks! It seems (sorry for forgetting some statistics) that correlation coefficient is defined as a strength between two variables which are linearly correlated. I would like to have something describing the "goodness of a fit" (which can be linear, polynomial, exponential etc). I will take a look at the curve fitting toolbox.

Mariana
Mariana 2011년 2월 2일
I found. "fit" does the job (we get rsquare among the statistics).
  댓글 수: 1
Ameen Bassam
Ameen Bassam 2021년 7월 27일
Is rsquare valid for nonlinear regression ??
It is invalid according to this
https://statisticsbyjim.com/regression/r-squared-invalid-nonlinear-regression/

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

카테고리

Help CenterFile Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by