MATLAB: Determine significance parameters for time series linear regression

linear regressionp-valuesignificancetime series

How can I calculate the p-value and the equation of the trend?

Best Answer

The Statistics and Machine Learning Toolbox has the regress function.
If you do not have that Toolbox, probably the easiest way is to use the polyfit function to fit the data (to a 1-degree polynomial) and File Exchange contribution polyparci (link) to calculate the parameter confidence intervals.