[ncl-talk] Bootstrapping method for significant test
Dennis Shea
shea at ucar.edu
Wed Dec 14 15:45:37 MST 2016
I think you will have to decide what is best.
[a]
Constrain the F,N,A triplets to be 'coupled'
nBoot = 10000
xBoot = *new*
<http://www.ncl.ucar.edu/Document/Functions/Built-in/new.shtml>
(nBoot, typeof(F))
do ns=0,nBoot-1 ; generate multiple estimates
iw = *generate_sample_indices*
<http://www.ncl.ucar.edu/Document/Functions/Contributed/generate_sample_indices.shtml>(N,*1*))
; indices with replacement
xBoot(ns) = (dF(iw)/dN(iw))*(dN(iw)/dA(iw))
end do
[b]
Unconstrained
nBoot = 10000
xBoot = *new*
<http://www.ncl.ucar.edu/Document/Functions/Built-in/new.shtml>
(nBoot, typeof(F))
do ns=0,nBoot-1 ; generate multiple estimates
iwF = *generate_sample_indices*
<http://www.ncl.ucar.edu/Document/Functions/Contributed/generate_sample_indices.shtml>(N,*1*))
; indices with replacement
iwN = *generate_sample_indices*
<http://www.ncl.ucar.edu/Document/Functions/Contributed/generate_sample_indices.shtml>(N,*1*))
iwA = *generate_sample_indices*
<http://www.ncl.ucar.edu/Document/Functions/Contributed/generate_sample_indices.shtml>(N,*1*))
xBoot(ns) = (dF(iwF)/dN(iwN))*(dN(iwN)/dA(iwA))
end do
[c]
See where your product fits.
ia = *dim_pqsort_n*
<http://www.ncl.ucar.edu/Document/Functions/Built-in/dim_pqsort_n.shtml>(xBoot,
2, 0) ; sort bootstrap means into ascending order
n025 = *round*
<http://www.ncl.ucar.edu/Document/Functions/Built-in/round.shtml>(0.025*(nBoot-1),3)
; indices for sorted array
n500 = *round*
<http://www.ncl.ucar.edu/Document/Functions/Built-in/round.shtml>(0.500*(nBoot-1),3)
n975 = *round*
<http://www.ncl.ucar.edu/Document/Functions/Built-in/round.shtml>(0.975*(nBoot-1),3)
xBoot_025= xBoot(n025) ; 2.5% level
xBoot_500= xBoot(n500) ; 50.0% level (median)
xBoot_975= xBoot(n975) ; 97.5% level
On Wed, Dec 14, 2016 at 3:12 PM, Anahita Amiri Farahani <aamir003 at ucr.edu>
wrote:
> Dear all,
>
> I have a product of two partial derivatives : dF/dN*dN/dA and for each of
> the variables (F, N, and A) I have data for 720 times. Each partial
> derivatives are calculated by linear regression. I was wondering how I can
> calculate the significant test for this product. All examples in NCL to
> estimate linear regression by this function: *regline_stats
> <http://www.ncl.ucar.edu/Document/Functions/Contributed/regline_stats.shtml> *
> give the regression coefficient for two variables.
>
> Thanks,
> Ana
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161214/44c6e4b0/attachment.html
More information about the ncl-talk
mailing list