[Thread Prev][Thread Next][Index]

Re: [ferret_users] Query regarding the 95% significant level by using student t test



Hi Abhishek,

Not sure if you had a question in there, but your script looks to along the right lines. Does it not work?

A small comment on significance: There was a recent paper by Daniel Wilks in BAMS that talked about it not being correct to ascribe significance on a map based on the individual grid square meeting a given p value requirement. Essentially, if you have lots of grid points there are lots of chances for you to falsely reject a null hypothesis. 

The method Wilks describes to account for this involves applying a more stringent test for each individual grid point to give a global significance of (say) p < 0.05. The catch is that you need the p values for each individual grid point, and I don’t think that ferret is able to return that value - perhaps there’s a pyferret solution (I do these sorts of calculations outside of ferret, save to netcdf, and then read into ferret for plotting.)  

Once you have the p values for each location you can use the script that I am about to email to ferret users in order to determine the critical p that each grid point would need to be below in order to have a global significance of 0.05 (or whatever). (I thought I had posted it, but can’t see in the archives.)

Wilks’s paper: http://journals.ametsoc.org/doi/abs/10.1175/BAMS-D-15-00267.1?af=R

Cheers,

Paul




On 8 Jul 2016, at 08:36, Abhishek Savita <abhisheknagar2@xxxxxxxxx> wrote:

Dear ferret users
 I have precipitation data for the period 1979-2010 from GPCP

 I have make the camposit of JJAS for EL Nini Modoki years. (from the anomaly)

 I want to check 95% signifinat from the JJAS camposit for the El Nino modoki by using significant at 90% confidence level from a 2-tailed Student’s t-test. i have tried like this

use "/home/abhishek/gpcp_precipitation_1979_2010.nc"
set region/x=30E:60W/y=-50:50
set mem/size=900
SET WINDOW/ASPECT=0.55
! <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<  Calculation for 95% confidencde level<<<<<<<
!let alpha = 0.025     ! alpha= 1%-95% = 5% = 0.05, alpha/2=0.025
let alpha = 0.01     ! alpha= 1%-90% = 10% = 0.01, alpha/2=0.005

! <<<<<<<<<<<<<< calculation for degree of freedom <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
let df = 384-1   ! total number of points-1, n=384 in my case

!<<<<<<<<<<<<<Now we see the t table for the t(1-alpha,n-1)

let t_sta = 2.330  !from the student t table alpha=0.01

!<<<<<<<<<<<<<<<<<Calculation for standatd error <<<<<<<<<<<<<<<<<<<<<<<<<<<<
let p = t[gt=precip]                  ! before doing i have  detrended the data
let q = precip

go regresst

let myline=p*slope+intercep     ! Here myline=qhat
let precip_detrend = precip-myline
let var_detrend=precip_detrend[l=@var]
let sd_detrend=var_detrend^0.5

let S_E=(sd_detrend/df^0.5)   ! calculation for standard error  S.E= standard_deviation/n^.05

!<<<<<<<<Calulation for critical value <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<!
let t_crit = t_sta*S_E        ! calculation for critical value Standard_error*t_sta

!<<<<<<<<<<<<<calculation for 90% of significant level <<<<<<<<<<<<<<<<<<<<<<<<<<<!

!<<<<<<<<<<<<<Calculation for mean<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<!
use climatological_axes
cancel data climatological_axes
let precip_detr_cli=precip_detrend[gt=month_`precip_detrend,return=cal`@mod]
let precip_detr_anm=precip_detrend-precip_detr_cli[gt=precip_detrend]

!<<<<<<<<<<<<Calculation for confidence interval <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<!
let precip_90_u = precip_detr_cli[gt=t_crit] + t_crit  ! (mean+t_crit)
let precip_90_l = precip_detr_cli[gt=t_crit] - t_crit  ! (mean-t_crit)

!<<<<<<<<<<<<<<<<<<Calculation for precipitation 95 signifivant <<<<<<<<<<<<<<<<<<

let var_sig = if precip_detr_anm ge precip_95_l and precip_detr_anm le precip_95_u then 1

let pre_95 = var_sig*precip_detr_anm

!<<<<<<<<<<<<<<<<<Camposit for JJAS during the canonical years <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<!
let var1=pre_95[t=15-jun-1986:15-sep-1986]
let var2 =pre_95[t=15-jun-1990:15-sep-1990]
let var3= pre_95 [t=15-jun-1991:15-sep-1991]
let var4= pre_95 [t=15-jun-1992:15-sep-1992]
let var5= pre_95 [t=15-jun-1994:15-sep-1994]
let var6= pre_95 [t=15-jun-2002:15-sep-2002]
let var7= pre_95 [t=15-jun-2004:15-sep-2004]
let precip_summer_jjas=(var1+var2+var3+var4+var5+var6+var7)/7

fill precip_summer_jja[l=@ave]


Thanks in advance

--
Regards

Abhishek Savita

Research Scholar (Earth System Science Technology)
Center For Oceans, Revers, Atmoshphere & Land Science Technology
Indian Institute of Technology, Kharagpur
+91-8609704619

 


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement