Testing for a non-zero linear trend.

4 ビュー (過去 30 日間)
Zach
Zach 2013 年 7 月 16 日
I am working with some station climate data. I am taking the pair-wise differences between neighboring stations' temperature values and plotting those differences in a time series. If I want to find out whether or not there is a significant non-zero trend in these data, would I use the regress(y,X) function? Here's an example of what I'm doing:
>> X=[x ones(92,1)];
>> y=0.00089303*x-2.1248;
>> [b,bint,r,rint,stats]=regress(y,X);
>> stats
The stats should return the F-statistic and its corresponding p-value which is testing for a non-zero slope, correct?
Thanks
ZH

回答 (1 件)

Jason
Jason 2013 年 7 月 16 日
Yes that is correct as long as the constant vector is included. Else the F is not valid.
You can also use regstats for other models and more stats than are available in regress (leverages etc).
cheers.

カテゴリ

Help Center および File ExchangeLinear and Nonlinear Regression についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by