<div dir="ltr">Thanks a lot, your answer was really helpful and I have another question: <div><br></div><div>Before I use regCoef function in NCL to calculate linear regression. Using this function gives other variables such as rcraw_npt, and  rcraw_tval, so I was able to calculate significance at 95%, 90% and 99% confidence level. I&#39;ve put that part of the code here:</div><div><br></div><div><div>do k=0,2999</div><div>    </div><div>   ab = regCoef(AI_fall(:,k),Nd_fall(:,k))</div><div>    rcraw_npt=ab@nptxy-2</div><div>    rcraw_tval=ab@tval</div><div>    b    = rcraw_tval</div><div>    b    = 0.5</div><div>    rcraw_npt=where(rcraw_npt.lt.1,1,rcraw_npt)</div><div>    rcraw_prob = (1 - betainc(rcraw_npt/(rcraw_npt+rcraw_tval^2),rcraw_npt/2.0,b) )</div><div>    sig_fall(k)=where(rcraw_prob.lt.0.95,-999,rcraw_prob)</div><div>   </div><div>end do</div><div><br></div><div><br></div><div>How can I calculate the significance at different confidence level here by using xBoot?</div><div><br></div><div>Best,</div><div>Ana </div><div><br></div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 14, 2016 at 2:45 PM, Dennis Shea <span dir="ltr">&lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>I think you will have to decide what is best.<br><br></div>[a]<br></div>Constrain the F,N,A triplets to be &#39;coupled&#39;<br><br><pre>   nBoot =   10000                           
   xBoot = <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/new.shtml" target="_blank"><strong>new</strong></a> (nBoot, typeof(F))
   
   do ns=0,nBoot-1                        ; generate multiple estimates
      iw = <a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/generate_sample_indices.shtml" target="_blank"><strong>generate_sample_indices</strong></a>(N,<b><font color="red">1</font></b>))  ; indices with replacement
      xBoot(ns) = (dF(iw)/dN(iw))*(dN(iw)/dA(iw)<wbr>)
   end do<br><br></pre><pre>[b]<br></pre><pre>Unconstrained<br><br> <br>   nBoot =   10000                           
   xBoot = <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/new.shtml" target="_blank"><strong>new</strong></a> (nBoot, typeof(F))
   
   do ns=0,nBoot-1                        ; generate multiple estimates
      iwF = <a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/generate_sample_indices.shtml" target="_blank"><strong>generate_sample_indices</strong></a>(N,<b><font color="red">1</font></b>)) ; indices with replacement<br>      iwN = <a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/generate_sample_indices.shtml" target="_blank"><strong>generate_sample_indices</strong></a>(N,<b><font color="red">1</font></b>)) <br>      iwA = <a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/generate_sample_indices.shtml" target="_blank"><strong>generate_sample_indices</strong></a>(N,<b><font color="red">1</font></b>)) </pre><pre>      xBoot(ns) = (dF(iwF)/dN(iwN))*(dN(iwN)/dA(<wbr>iwA))
   end do<br></pre>[c]<br></div>See where your product fits.<br><br><pre>   ia = <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/dim_pqsort_n.shtml" target="_blank"><strong>dim_pqsort_n</strong></a>(xBoot, 2, 0)        ; sort bootstrap means into ascending order
   
   n025     = <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/round.shtml" target="_blank"><strong>round</strong></a>(0.025*(nBoot-1),3)    ; indices for sorted array
   n500     = <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/round.shtml" target="_blank"><strong>round</strong></a>(0.500*(nBoot-1),3)                             
   n975     = <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/round.shtml" target="_blank"><strong>round</strong></a>(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
</pre><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Dec 14, 2016 at 3:12 PM, Anahita Amiri Farahani <span dir="ltr">&lt;<a href="mailto:aamir003@ucr.edu" target="_blank">aamir003@ucr.edu</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Dear all,<div><br></div><div>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: <strong style="margin:0px;padding:0px;text-decoration:none;font-family:verdana,sans-serif;font-size:13.3333px"><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/regline_stats.shtml" style="color:rgb(133,45,133);margin:0px;padding:0px;text-decoration:none;font-family:verdana,sans-serif;font-size:13.3333px" target="_blank">regline_stats</a><font color="#000000"><span style="background-color:rgb(255,231,198)"> </span></font></strong>  give the regression coefficient for two variables.</div><div><br></div><div>Thanks,</div><div>Ana <br></div></div>
<br></div></div>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>