[Thread Prev][Thread Next][Index]

Re: linear regression



Hi Gert,

A quick P.S. on Mick's response:

If you specify multi-dimensional arrays as input to regresst.jnl it computes the
slopes and intercepts for each point in x,y,z. For example, if
    v_xyt  -- is a time series of xy fields (Nx x Ny x Nt)
and
    v_t  -- is a single point time series (Nt)
then regressing v_xyt against v_t will yield slope and intercept results of
dimension Nx x Ny -- a regression result at each (x,y) coordinate.

    - steve

========================

Gert van Dijken wrote:

> Hi all,
>
> I have some problems using the linear regression go-tools.
>
> My data set looks as follows:
>
> yes? show data
>      currently SET data sets:
>     1> ./ozo_prod_diff.cdf  (default)
>  name     title                             I         J         K         L
>  OZODIFF  (OZO[D=map.79F.V2]-OZO[D=map.92  1:301     1:301     ...       1:153
>  PRODDIFF (PROD79_MASK- PROD92_MASK)*100/  1:301     1:301     ...       1:153
>
> I would like to find the equation of the best fit (and r^2) for each day
> (L) when I plot ozodiff vs. proddiff.
>
> What I tried was more or less the following, for example day 45:
> yes? plot/vs/l=45 ozodiff,proddiff
> yes? ! lots of points, but it looks like a pretty good linear correlation...
> yes? let q = ozodiff[l=45]
> yes? let p = proddiff[l=45]
> yes? go regresst
> yes? set grid q
> yes? list slope
>
> The problem is that 'slope', 'intercep' or 'rsquare' are not one point,
> but a 301x301 array.  When I use 'go regressx' or 'go regressy' I get a
> 1x301 array.  Using 'go regressz' also gives a 301x301 array.
>
> Am I using the wrong go-tool?
>
> Ferret version:  ! Version 5.22 - 07/27/00
>
> Thanks,
>
> Gert

--
Steve Hankin
NOAA/PMEL, 7600 Sand Point Way NE, Seattle, WA 98115-0070
ph. (206) 526-6080 -- FAX (206) 526-6744




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement