Re: regression coefficient

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu Jan 10 2013 - 21:09:24 MST

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 Thu Jan 10 21:09:35 2013

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