Re: Regression

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed Jun 15 2011 - 06:41:02 MDT

Change

(/regCoef(data(lat|:,lon|:,season|:,component|:,mdl|i,ens|j,time|:),\
              boxidx(season|:,component|0,mdl|i,ens|j,time|:))/)

To
                ; 0 1 2 3 4 5 6
    work1 = data(lat|:,lon|:,season|:,component|:,mdl|i,ens|j,time|:)
    work2 = boxidx(season|:,component|0,mdl|i,ens|j,time|:)
    work3 = conform(work1, work2, (/2,3,4,5,6/) )

    regCoef(work1, work3)

http://www.ncl.ucar.edu/Document/Functions/Built-in/conform.shtml

Good luck

On 6/15/11 12:31 AM, gibies george wrote:
> Dear NCL users,
>
> I have tried to do a regression analysis to identify the circulation
> pattern "data" which favours the index "boxidx" .
>
> regre(lat|:,lon|:,season|:,component|:,idxssn|:,mdl|i,ens|j) =\
>
> (/regCoef(data(lat|:,lon|:,season|:,component|:,mdl|i,ens|j,time|:),\
> boxidx(season|:,component|0,mdl|i,ens|j,time|:))/)
>
> *regCoef(data,boxidx) : here "data" is the cause and "boxidx" is its
> effect*.
>
> But unfortunately "*boxidx" *have less dimensions**than *"data"* and
> this case is not handled by *regCoef() function*.
>
> I got an error message as follows.
>
> fatal:regCoef: The input array y must have as many or more dimensions than x
> fatal:Execute: Error occurred at or near line 2130 in file
> /home/gibies/ncl/mylib/lib_gibies_analysis_module.ncl
>
> fatal:Execute: Error occurred at or near line 2460 in file
> /home/gibies/ncl/mylib/lib_gibies_analysis_module.ncl
>
> fatal:Execute: Error occurred at or near line 2886 in file
> /home/gibies/ncl/mylib/lib_gibies_analysis_module.ncl
>
> fatal:Execute: Error occurred at or near line 22 in file
> /home/gibies/ncl/myscripts/skillanal.ncl
>
> By theory *regCoef(data,boxidx)* is not equal to
> *regCoef(boxidx,**data**)*. Hence how can I solve this problem?
> *____________________________________
> _Theory_
>
> **y = mean(y) + regCoef(x,y){x - mean(x)}
> **x = mean(x) + regCoef(y,x){y - mean(y)}
> ____________________________________*
>
> --
> *Gibies George, CSIR-RF,*
> *Monsoon Seasonal Prediction Group,
> Climate and Global Modelling Division,
> Indian Institute of Tropical Meteorology,
> Dr. Homi Bhabha Road,
> NCL (P. O.), Pashan,
> Pune 411008, India.*
>
> *http://sites.google.com/site/gibiesge/*
>
> Please Think about the environment. Save paper; Save Trees; and don't
> print this e-mail unless it is necessary.
>
>
>
> _______________________________________________
> 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 Wed Jun 15 06:41:10 2011

This archive was generated by hypermail 2.1.8 : Mon Jun 20 2011 - 12:30:20 MDT