Re: regressions in NCL

From: Advait Godbole <advaitgodbole_at_nyahnyahspammersnyahnyah>
Date: Wed Aug 24 2011 - 12:19:56 MDT

Many thanks Dennis, that worked.

Advait

On Tue, Aug 23, 2011 at 12:51 AM, Dennis Shea <shea@ucar.edu> wrote:

> 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<http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
>>
>

-- 
advait godbole

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Aug 24 12:20:04 2011

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