Re: Lag-regression Coefficient to regressed data

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue Oct 01 2013 - 10:55:52 MDT

Not sure of the question.

   rgres_data = new ( (/mlon,nlagr/), typeof(P1), getFillValue(P1))
   rgres_data = rlag1*???

or, maybe you need to use regline.

   rlag = new( (/mlon,nlagr/), typeof(P1), getFillValue(P1))
   yint = new( (/mlon,nlagr/), typeof(P1), getFillValue(P1))

   do n=0,nlagr-1
     do m=0,mlon-1
      r = regline(x(0:Nend-n-yLag), P1(lon|m,time|yLag+n:Nend) )
      rlag(m,n) = r
      yint(m,n) = r@yintercept

      rgres_data(m,n) = rlag(m,n)*??? + yint(m,n)
     end do
   end do

or

   do n=0,nlagr-1
     do m=0,mlon-1
      r = regline(x(0:Nend-n-yLag), P1(lon|m,time|yLag+n:Nend) )
      rgres_data(m,n) = r*????
     end do
   end do

On 10/1/13 4:11 AM, Abhik Santra wrote:
>
> Dear NCL-users,
>
> I want to calculate lag-regression using daily data.
> I have followed the methodology that is mentioned in one of the earlier NCL-talk dated Jul,12 2010.
>
> Nend = 4017 ; length of the time-series, x
> nlagr= 41 ; +- 20 lag
> yLag = 20
>
> do n=0,nlagr-1
> rlag1(:,n) = regCoef(x(0:Nend-n-yLag), P1(lon|:,time|yLag+n:Nend) )
> end do
>
> "rlag" gives the regression coefficient.
> But I want to calculate the regressed data using this coefficient.
> Can you please help me to do that?
> Thanking you in advance.
>
> With regards,
> Abhik
>
> ___________________________________________
>
> Abhik Santra
> CSIR Research Fellow,
> Indian Institute of Tropical Meteorology,
> Pune - 411008.
> India
> ___________________________________________
> _______________________________________________
> 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 Tue Oct 1 10:55:56 2013

This archive was generated by hypermail 2.1.8 : Tue Oct 01 2013 - 14:41:44 MDT