Hi,
The "regresst" script uses two variables that have the same time
axis to compute a linear regression, with P as the independent
variable and q the dependent variable.
yes? go/help regresst
Full path name:
/home/users/tmap/ferret/x86_64-linux/go/regresst.jnl
\CANCEL MODE VERIFY
! Description: define FERRET variables for regression along
the T axis
! updated 10/93 for Ferret V3.01
! 10/09 More-robust computations of variance using the Ferret
@VAR transform
say ... Linear Regression Along the T Axis
say ... Instructions:
say Use the LET command to define new variables
say Define the variable P as your independent (X) variable
say Define the variable Q as your dependent (Y) variable
say Results will be variables "SLOPE", "INTERCEP" and
"RSQUARE"
say QHAT will be the regression estimate
say Note: If "T" is your independent variable then
say ... "SET GRID Q" after defining Q.
say ...
You could define a time variable as the independent variable, and
your SST variable on its XYT grid as the dependent variable.
yes? let tt = t[gt=sst]
yes? let p = tt
yes? let q = sst
yes? go regresst
Now, the results, "slope", "Intercep", and "rsquare" are 2-D
variables with each XY grid cell containing the slope , intercept,
and rsquare. So you can
yes? shade slope
And the qhat regression line is a function of T available at any
location,
yes? plot/x=300/y=-10 qhat
Note as discussed in another thread today,
http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2015/msg00529.html,
the units of slope, intercep, etc, depend on the units of the time
axis that is used.
-Ansley
On 1/17/2016 11:28 PM, Dongwon Yi
wrote:
How can
I get a value of linear trend ?
I have 2 dimensional SST data about
100 years and I would like to know the value of linear trend
on every each grid.
Thanks
|