[ncl-talk] Problem using ttest function
Adam Phillips
asphilli at ucar.edu
Fri Jan 18 12:12:04 MST 2019
Hi Anne,
You are calling equiv_sample_size (which we usually recommend), and then
your are calling wgt_areaave to arrive at one number:
xEqv = equiv_sample_size (jfm_s, sigr, 0)
yEqv = equiv_sample_size (jfm_c, sigr, 0)
xN = wgt_areaave (xEqv, 1., 1., 0) ; wgty could be gaussian weights
yN = wgt_areaave (yEqv, 1., 1., 0)
prob = 100.*(ttest(ave_s, VAR_s, xN, ave_c, VAR_c, yN, iflag,
tval_opt))
To simplify things you could replace xN and yN with 10 (=the number of
ensemble members, or sample size). But note: Depending on the field you are
looking at 10 samples is not a large number, especially if there is high
autocorrelation. This also might result in values coming out of
equiv_sample_size = 1 or 0, which might cause issues in the ttest function.
Hope that helps. If you have further questions let ncl-talk know.
Adam
On Thu, Jan 17, 2019 at 2:14 PM Anne <anne.seidenglanz at unive.it> wrote:
> Hi everyone,
>
> I have some issues using the built-in 'ttest' function. When I plot the
> 'raw' probability (so regardless of any significance level), I end up with
> a rather strange plot, see attached.
> I followed example 4 from the documentation at
> https://www.ncl.ucar.edu/Document/Functions/Built-in/ttest.shtml, just
> that instead of time I have ensemble member as the right-most dimension,
> and hence compute mean and variance of the ensemble members. So my two
> fields each have the following dimensions:
> Dimensions and sizes: [Ens | 10] x [lat | 180] x [lon | 360]
>
> Fields for mean and variance look fine, but there is something wrong with
> the probability plot. I attach also the script.
>
> Thanks for any advice,
> Anne
>
> Nota automatica aggiunta dal sistema di posta.
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
--
Adam Phillips
Associate Scientist, Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/ 303-497-1726
<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190118/a449306e/attachment.html>
More information about the ncl-talk
mailing list