[Thread Prev][Thread Next][Index]

Re: [ferret_users] query for regression analysis.



Dear Billy,

Thank you for your reply. I plotted the raw data and its showing a very robust trend in it. Before jumping for statistic I removed the mean seasonal cycle from my data then I computed the slope. I hope removing the seasonal cycle is the best thing one can do before calculating the trend.

Regards, Saurabh

On Fri, Aug 25, 2017 at 11:40 PM, William Kessler <william.s.kessler@xxxxxxxx> wrote:
Do your variables have an annual cycle?

If your two time series have a correlated (or anti-correlated) annual cycle then the regression slope can be quite different than if they don't. Imagine three time series:
a) a straight line (with some slope or trend)
b) the same straight line plus an annual cycle
c) the same straight line with the oppositely-phased annual cycle

The correlations and regression slopes among these three will be entirely different:

yes? define axis/t=1:60:1 tax
yes? let a=tt*1.1
yes? let b=tt*1.1-10*sin(pi*(tt*10)/180)
yes? let c=tt*1.1+10*sin(pi*(tt*10)/180)

Plot these to see the relation among them
yes? plot a,b,c  ! the most important step

yes? let p=a;let q=b
yes? go regresst
yes? yes? let p=a;let q=b
yes? list slope,rsquare^.5
          SLOPE    EX#2
I / *:     1.066  0.9494
yes? let q=c
yes? list slope,rsquare^.5
           SLOPE    EX#2
I / *:     0.9337  0.9355
yes? let p=b
yes? list slope,rsquare^.5
           SLOPE    EX#2
I / *:     0.6906  0.7772

Note that these are quite different, because of the various correlations of their annual cycles

! now make an "annual average" from b and c:

yes? let p=c[l=@sbx:36]
yes? let q=b[l=@sbx:36]
yes? list slope,rsquare^.5
          SLOPE   EX#2
I / *:     1.000  1.000

Removing the annual cycles changes the slope and correlation. The regression is comparing point by point, and if the time series vary coherently on the annual cycle, that will affect the results (as it should). If there are strong annual cycles then the annual-average statistics will be different than the monthly values.

===>>> When you get a confusing result, PLOT THE ORIGINAL DATA. Do not blindly calculate statistics without having looked at the data directly!!!!

Billy K

> On Aug 25, 2017, at 12:25 AM, saurabh rathore <rohitsrb2020@xxxxxxxxx> wrote:
>
> Dear Ferreters,
>
> I got a small doubt which is creating a big difference in my analysis. I computed two type linear regression from go regresst from that same set of data having 132 monthly time steps. In first method I used the monthly time series and computed the slope and multiplied it with 12 to convert it into J/year from J/month which is coming in the order of 1*10^7 J/year. But when I calculated the slope from the annually average values i.e. 11 years from 132 monthly time step values then my slope is coming in order of 1*10^8 J/year. So why is this happening and which one is right way for computation.
>
> ​I hope I am clear for my query and hoping that some one have overcome this problem.​
>
> ​regards, saurabh​
>
>
> --
>
>
> REGARDS
>
> Saurabh Rathore
> Research Scholar (PhD.)
> Centre For Oceans, Rivers, Atmosphere & Land Science Technology
> Indian Institute Of Technology, Kharagpur
> contact :- 91- 8345984434




--


REGARDS

Saurabh Rathore
Research Scholar (PhD.)
Centre For Oceans, Rivers, Atmosphere & Land Science Technology
Indian Institute Of Technology, Kharagpur
contact :- 91- 8345984434

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement