Re: regressions in NCL

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon Aug 22 2011 - 22:51:30 MDT

Unlike 'regline' the Y-Intercept is not calculated in regCoef.
The next version of NCL should return this. In the mean time,

Assuming X(time,lat,lon) and Y(time,lat,lon) and you have done
something like the following:

  R = regCoef(X(lat|:,lon|:,time|:),Y(lat|:,lon|:,time|:)) ; (nlat,mlon)

and that you have no missing data (X or Y) then the y-intercept can
be *correctly* calculated via

  YI = dim_avg_n(Y,0) - R*dim_avg_n(X,0)

On 8/21/11 5:27 PM, Advait Godbole wrote:
> Dear Members,
>
> I have currently obtained the regression coefficient using /regCoef/ for
> a regression, say, Y = f (X). Both Y and X are of dimensions 120 x 356 x
> 507 (time, lat, lon), with the regressions being performed over time.
> Does the /regCoef/ procedure explicitly calculate the intercept as well?
> If not, and I calculate it manually using the least squares
> formulation, will that hold true for the regression calculation
> and yield the *correct* predicted Y?
>
> Thanks in advance,
>
> --
> advait godbole
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Aug 22 22:51:37 2011

This archive was generated by hypermail 2.1.8 : Thu Aug 25 2011 - 09:54:48 MDT