Re: regression coefficient

From: Xi Chang <xi.chang01_at_nyahnyahspammersnyahnyah>
Date: Fri Jan 11 2013 - 06:36:42 MST

Thanks for the response,
I think my way (codes) to calculate is still wrong.
Does anyone here has experince how to calculate regression coefficient
at 95% confidence level?

I will really really appreciate if anyone can share their experience how to
calculate
it here.

Regards,
Xi Chang.

On Fri, Jan 11, 2013 at 1:09 PM, Mary Haley <haley@ucar.edu> wrote:

> Dear Xi,
>
> The error message is telling you that your argumens to the "where"
> function do not have the correct dimensions.
>
> In order to use the "where" function, he second and third arguments must
> either be the same dimensionality as the first argument, or else be scalars.
>
> My guess is that since "rc@_FillValue" is likely a scalar, and is
> probably okay, then "rc" is not the same dimensionality as "prob".
>
> -Mary
>
>
> On Jan 7, 2013, at 9:14 AM, Xi Chang wrote:
>
> > I really need a help, I want to plot the regression coeff at 95%
> confidence limit in 2D map.
> > ---[snip]
> > x = ispan(0,dimsizes(trmm&time)-1,1)*1.
> > rc = regCoef(x,trmm)
> > df = rc@nptxy-2 ; degrees of freedom
> > tval = rc@tval ; t-statistic
> > b = tval ; b must be same size as tval (and df)
> > b = 0.5
> > prob = (1 - betainc(df/(df+tval^2),df/2.0,b) )
> > copy_VarCoords(rc,prob)
> > rc95 = where(prob.lt.95,rc@_FillValue,rc)
> > --[snip]
> > plot = gsn_csm_contour_map_ce(wks,rc,res)
> >
> > but i got an error:
> > fatal:where: condition variable (parameter 1) dimension mismatch with
> parameter 2
> >
> > Anybody can give me some suggestions or maybe the codes are not correct
> (?).
> >
> > Thanks,
> > Xi Chang.
> >
> > _______________________________________________
> > 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 Fri Jan 11 06:37:03 2013

This archive was generated by hypermail 2.1.8 : Mon Jan 14 2013 - 14:31:38 MST