How to plot polynomial by using Data points??
조회 수: 2 (최근 30일)
이전 댓글 표시
I have 2 different time series, among them I want to plot polynomial. How can i get the polynomial plot for these time series, (especially the R-square values)??
Also i want to find out that the relation between both tme series is signigicant or not? How to check it?
Data set is attached in excel file.
댓글 수: 0
답변 (1개)
Walter Roberson
2023년 5월 19일
If the idea is that the points are a uniform distance apart, such as at x = 3, x = 5, x = 7, and so on, each position implied by some known starting point (perhaps 1) and some known increment per-row (such as 1); and that the rows give the corresponding y values...
then in that situation there is no meaningful polynomial fit for either of the variables.
The highest R-squared for the first time series, tested up to degree 9, is about 0.4. The highest R-squared for the second time series, tested up to degree 9, is about 0.54. This R-squared numbers already take into account centering and scaling (which would compensate for the fact that we do not know the distance between points, as long as the distance is uniform.)
There is no point testing beyond degree 9: polynomial fit rapidly becomes too inaccurate numerically beyond degree 7 or so.
If you plot the two columns independently you can see that the correlation between them is terrible.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!