[Thread Prev][Thread Next][Index]

Re: [ferret_users] qhat problem after linear regression



Thanks Russell. It worked.

Peter

On Thu, Feb 5, 2009 at 1:05 AM, Russell Fiedler <russell.fiedler@xxxxxxxx> wrote:
Peter,
You are dynamically overriding the length of the time series on which the
regression is done.

list qhat will perform a regression on the whole time series
list qhat[l=1:10] only uses the first 10 members

Instead
let p=t[gt=var,=1:length_of_time_series]
let q=var[l=1:length_of_time_series]

should do what you want.

Cheers,
Russ

On Thursday 05 February 2009 01:11, you wrote:
> Dear Users,
>
> my original data set is of x-y and t axes. I execute linear regresison
> along t axis.
>
> let p=t[gt=var]
> let q=var
> go regresst
>
> With this script i create a variable "qhat". Which is the equation of the
> linear trend (let qhat = slope*p + intercep). If i list qhat for the whole
> time and for the selected period, i get different results (see below). qhat
> for the whole time has the correct values, but i only want some selected to
> be listed or work with.
>
> Does someone know what could be the problem?
> Many thanks, Peter
>
> -------------------
> list qhat[l=1:10]
> 1    /  1:  3.091
>  2    /  2:  2.982
>  3    /  3:  2.873
>  4    /  4:  2.764
>  5    /  5:  2.655
>  6    /  6:  2.545
>  7    /  7:  2.436
>  8    /  8:  2.327
>  9    /  9:  2.218
>  10   / 10:  2.109
> list qhat
>  1    /  1:  2.383
>  2    /  2:  2.416
>  3    /  3:  2.449
>  4    /  4:  2.482
>  5    /  5:  2.515
>  6    /  6:  2.548
>  7    /  7:  2.580
>  8    /  8:  2.613
>  9    /  9:  2.646
>  10   / 10:  2.679
>  11   / 11:  2.712
>  12   / 12:  2.745
>  13   / 13:  2.778
>  14   / 14:  2.811
>  15   / 15:  2.844
>  16   / 16:  2.877
>  17   / 17:  2.910
>  18   / 18:  2.943
>  19   / 19:  2.976
>  20   / 20:  3.009
>  21   / 21:  3.041
>  22   / 22:  3.074
>  23   / 23:  3.107
>  24   / 24:  3.140
>  25   / 25:  3.173
>  26   / 26:  3.206
>  27   / 27:  3.239
>  28   / 28:  3.272
>  29   / 29:  3.305
>  30   / 30:  3.338
>  31   / 31:  3.371
>  32   / 32:  3.404
>  33   / 33:  3.437
>  34   / 34:  3.470
>  35   / 35:  3.502
>  36   / 36:  3.535
>  37   / 37:  3.568
>  38   / 38:  3.601
>  39   / 39:  3.634
>  40   / 40:  3.667


[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement