How to plot polynomial by using Data points??
2 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Walter Roberson
on 19 May 2023
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 Comments
See Also
Categories
Find more on Linear and Nonlinear Regression in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!