power1d.prob

Theoretical continuum-level probabilities for central t fields and for noncentral t and F fields.

These calculations come from the random field theory (RFT) literature and in particular from the three references listed below. The main RFT calculations come from Hasofer (1978) and Friston et al. (1994) and the non-central distribution calculations come from Hayasaka et al. (2007) and Joyce & Hayasaka (2012).

REFERENCES

Friston KJ, Holmes A, Poline JB, Price CJ, Frith CD (1996). Detecting Activations in PET and fMRI: Levels of Inference and Power. NeuroImage 4(3): 223-235.
Friston KJ, Worsley KJ, Frackowiak RSJ, Mazziotta JC, Evans AC (1994). Assessing the significance of focal activations using their spatial extent. Human Brain Mapp 1: 210-220.
SPM12 software:
Hasofer AM (1978) Upcrossings of random fields. Suppl Adv Appl Prob 10:14-21.
Hayasaka S, Peiffer AM, Hugenschmidt CE, Laurienti PJ (2007). Power and sample size calculation for neuroimaging studies by non-central random field theory. NeuroImage 37(3), 721-730.
Joyce KE, Hayasaka S (2012). Development of PowerMap: a Software Package for Statistical Power Calculation in Neuroimaging Studies Neuroinform 10: 351.
PowerMap software:

ec_density_f

power1d.prob.ec_density_f(z, v, delta=None)

Euler characteristic density for central F fields.

Adapted from “spm_ECdensity.m” in “SPM12” (Friston et al. 1994)

Arguments:

z —- height (float)

v —- degrees of freedom (float, float)

delta —- (not used by this function)

Reference: Worsley KJ et al. (1996) Hum Brain Mapp 4:58-73 Reference: Worsley KJ et al. (2004) [Eqn.2 and Table 2]

ec_density_ncf

power1d.prob.ec_density_ncf(z, v, delta)

Euler characteristic density for non-central F fields.

Adapted from “pm_ECncF.m” in “PowerMap” (Joyce & Hayasaka 2012)

Arguments:

z —- height (float)

v —- degrees of freedom (float)

delta —- non-centrality parameter (float)

ec_density_nct

power1d.prob.ec_density_nct(z, v, delta)

Euler characteristic density for non-central t fields.

Adapted from “pm_ECncT.m” in “PowerMap” (Joyce & Hayasaka 2012)

Arguments:

z —- height (float)

v —- degrees of freedom (float)

delta —- non-centrality parameter (float)

ec_density_t

power1d.prob.ec_density_t(z, v, delta=None)

Euler characteristic density for central t fields.

Adapted from “spm_ECdensity.m” in “SPM12” (Friston et al. 1994)

Arguments:

z —- height (float)

v —- degrees of freedom (float)

delta —- (not used by this function)

Reference: Worsley KJ et al. (1996) Hum Brain Mapp 4:58-73 Reference: Worsley KJ et al. (2004) [Eqn.2 and Table 2]

exp_ncx

power1d.prob.exp_ncx(df, delta, r)

Non-central chi-square moments around zero

Adapted from “pm_Exp_ncX.m” in “PowerMap” (Joyce & Hayasaka 2012)

Arguments:

df —- degrees of freedom (float)

delta —- non-centrality parameter (float)

r —- power (positive float)

f_isf

power1d.prob.f_isf(alpha, df, Q, fwhm)

Inverse survival function for central f fields

Arguments:

alpha —- Type I error rate (float between 0 and 1)

df —- degrees of freedom (float, float)

Q —- continuum size (integer)

fwhm —- continuum smoothness (positive float); full-width-at-half-maximum

f_sf

power1d.prob.f_sf(u, df, Q, fwhm)

Survival function for central F fields.

Arguments:

u —- height (float)

df —- degrees of freedom (float)

Q —- continuum size (integer)

fwhm —- continuum smoothness (positive float); full-width-at-half-maximum

ncf_sf

power1d.prob.ncf_sf(u, df, Q, fwhm, delta)

Survival function for noncentral f fields.

Adapted from “pm_P_ncT.m” in “PowerMap” (Joyce & Hayasaka 2012)

Arguments:

u —- height (float)

df —- degrees of freedom (float)

Q —- continuum size (integer)

fwhm —- continuum smoothness (positive float); full-width-at-half-maximum

delta —- noncentrality parameter

nct_sf

power1d.prob.nct_sf(u, df, Q, fwhm, delta)

Survival function for noncentral t fields.

Adapted from “pm_P_ncT.m” in “PowerMap” (Joyce & Hayasaka 2012)

Arguments:

u —- height (float)

df —- degrees of freedom (float)

Q —- continuum size (integer)

fwhm —- continuum smoothness (positive float); full-width-at-half-maximum

delta —- noncentrality parameter

t_isf

power1d.prob.t_isf(alpha, df, Q, fwhm)

Inverse survival function for central t fields

Arguments:

alpha —- Type I error rate (float between 0 and 1)

df —- degrees of freedom (float)

Q —- continuum size (integer)

fwhm —- continuum smoothness (positive float); full-width-at-half-maximum

t_sf

power1d.prob.t_sf(u, df, Q, fwhm)

Survival function for central t fields.

Arguments:

u —- height (float)

df —- degrees of freedom (float)

Q —- continuum size (integer)

fwhm —- continuum smoothness (positive float); full-width-at-half-maximum

power_Friston1994

power1d.prob.power_Friston1994(alpha, df, Q, W0, W1, sigma)

Continuum-level power calculation using the inflated variance method (Friston et al. 1994)

Arguments:

alpha —— Type I error rate (float)

df —— degrees of freedom (float)

Q —— continuum size (int)

W0 —— continuum smoothness under the null hypothesis (positive float)

W1 —— continuum smoothness under the alternative hypothesis (float)

sigma —— effect size (noise amplitude under the alternative hypothesis) (positive float)

Reference:

Friston KJ, Worsley KJ, Frackowiak RSJ, Mazziotta JC, Evans AC (1994). Assessing the significance of focal activations using their spatial extent. Human Brain Mapp 1: 210-220.

power_Hayasaka2007

power1d.prob.power_Hayasaka2007(alpha, df, Q, fwhm, effect)

Continuum-level power calculation using the non-central t method (Hayasaka et al. 2007)

Arguments:

alpha —— Type I error rate (float)

df —— degrees of freedom (float)

Q —— continuum size (int)

fwhm —— continuum smoothness (positive float)

effect —— effect size (random field shift as: mu/sigma) (float)

Reference:

Hayasaka S, Peiffer AM, Hugenschmidt CE, Laurienti PJ (2007). Power and sample size calculation for neuroimaging studies by non-central random field theory. NeuroImage 37(3), 721-730.

power

power1d.prob.power(alpha, df, Q, fwhm, effect, method='nct')

Continuum-level theoretical power calculations for one-sample t tests.

This is a convenience function for generating comparable results for the “iv” and “nct” methods (see below). That is, the two methods define effects slightly differently, but this function ensures that the effect is defined approximately the same for both methods, thus making the two methods directly comparable.

alpha —— Type I error rate (float)

df —— degrees of freedom (float)

Q —— continuum size (int)

fwhm —— continuum smoothness (positive float)

effect —— effect size (float)

method —— one of “iv” or “nct”

Methods:

iv —— inflated variance method (Friston et al. 1994)

nct —— noncentral t method (Hayasaka et al. 2007)