Statistical Analysis

neurora.stats_cal module

a module for conducting the statistical analysis

neurora.stats_cal.stats(corrs, fisherz=True, permutation=True, iter=1000)

Conduct the statistical analysis for results of EEG-like data

Parameters
  • corrs (array) – The correlation coefficients. The shape of corrs must be [n_subs, n_chls, n_ts, 2]. n_subs, n_chls, n_ts represent the number of subjects, the number of channels and the number of time-points. 2 represents a r-value and a p-value.

  • fisherz (bool True or False. Default is True.) – Conduct Fisher-Z transform.

  • permutation (bool True or False. Default is False.) – Use permutation test or not.

  • iter (int. Default is 1000.) – The times for iteration.

Returns

stats – The statistical results. The shape of stats is [n_chls, n_ts, 2]. n_chls, n_ts represent the number of channels and the number of time-points. 2 represents a t-value and a p-value.

Return type

array

Notes

n_subs must >= 6. This function can be used for the correlation results of NPS, ISC, eeg-like RDMs-correlations.

neurora.stats_cal.stats_fmri(corrs, fisherz=True, permutation=False, iter=1000)

Conduct the statistical analysis for results of fMRI data (searchlight)

Parameters
  • corrs (array) – The correlation coefficients. The shape of corrs must be [n_subs, n_x, n_y, n_z, 2]. n_subs, n_x, n_y, n_z represent the number of subjects, the number of calculation units for searchlight along the x, y, z axis and 2 represents a r-value and a p-value.

  • fisherz (bool True or False. Default is True.) – Conduct Fisher-Z transform.

  • permutation (bool True or False. Default is False.) – Use permutation test or not.

  • iter (int. Default is 1000.) – The times for iteration.

Returns

stats – The statistical results. The shape of stats is [n_x, n_y, n_z, 2]. n_x, n_y, n_z represent the number of calculation units for searchlight along the x, y, z axis and 2 represents a t-value and a p-value.

Return type

array

Notes

n_subs must >= 6. This function can be used for the results of searchlight fMRI NPS and searchlight fMRI RDM-correlations.

neurora.stats_cal.stats_fmri_compare_betweengroups(corrs1, corrs2, fisherz=True, permutation=False, iter=5000)

Conduct the statistical analysis for results of fMRI data (searchlight) (between 2 groups: group1 > group2)

Parameters
  • corrs1 (array) – The correlation coefficients for group 1. The shape of corrs must be [n_subs, n_x, n_y, n_z, 2]. n_subs, n_x, n_y, n_z represent the number of subjects, the number of calculation units for searchlight along the x, y, z axis and 2 represents a r-value and a p-value.

  • corrs2 (array) – The correlation coefficients for group 2. The shape of corrs must be [n_subs, n_x, n_y, n_z, 2]. n_subs, n_x, n_y, n_z represent the number of subjects, the number of calculation units for searchlight along the x, y, z axis and 2 represents a r-value and a p-value.

  • fisherz (bool True or False. Default is True.) – Conduct Fisher-Z transform.

  • permutation (bool True or False. Default is False.) – Use permutation test or not.

  • iter (int. Default is 5000.) – The times for iteration.

Returns

stats – The statistical results. The shape of stats is [n_x, n_y, n_z, 2]. n_x, n_y, n_z represent the number of calculation units for searchlight along the x, y, z axis and 2 represents a t-value and a p-value.

Return type

array

Notes

n_subs must >= 6. This function can be used for the results of searchlight fMRI NPS and searchlight fMRI RDM-correlations.

neurora.stats_cal.stats_fmri_compare_withingroup(corrs1, corrs2, fisherz=True, permutation=False, iter=1000)

Conduct the statistical analysis for results of fMRI data (searchlight) (within group: corrs1 > corrs2)

Parameters
  • corrs1 (array) – The correlation coefficients under condition 1. The shape of corrs must be [n_subs, n_x, n_y, n_z, 2]. n_subs, n_x, n_y, n_z represent the number of subjects, the number of calculation units for searchlight along the x, y, z axis and 2 represents a r-value and a p-value.

  • corrs2 (array) – The correlation coefficients under condition 2. The shape of corrs must be [n_subs, n_x, n_y, n_z, 2]. n_subs, n_x, n_y, n_z represent the number of subjects, the number of calculation units for searchlight along the x, y, z axis and 2 represents a r-value and a p-value.

  • fisherz (bool True or False. Default is True.) – Conduct Fisher-Z transform.

  • permutation (bool True or False. Default is False.) – Use permutation test or not.

  • iter (int. Default is 1000.) – The times for iteration.

Returns

stats – The statistical results. The shape of stats is [n_x, n_y, n_z, 2]. n_x, n_y, n_z represent the number of calculation units for searchlight along the x, y, z axis and 2 represents a t-value and a p-value.

Return type

array

Notes

n_subs must >= 6. This function can be used for the results of searchlight fMRI NPS and searchlight fMRI RDM-correlations.

neurora.stats_cal.stats_iscfmri(corrs, fisherz=True, permutation=False, iter=1000)

Conduct the statistical analysis for results of fMRI data (ISC searchlight)

Parameters
  • corrs (array) – The correlation coefficients. The shape of corrs must be [n_ts, n_subs!/(2!*(n_subs-2)!), n_x, n_y, n_z, 2]. n_ts, n_subs, n_x, n_y, n_z represent the number of subjects, the number of calculation units for searchlight along the x, y, z axis and 2 represents a r-value and a p-value.

  • fisherz (bool True or False. Default is True.) – Conduct Fisher-Z transform.

  • permutation (bool True or False. Default is False.) – Use permutation test or not.

  • iter (int. Default is 1000.) – The times for iteration.

Returns

stats – The statistical results. The shape of stats is [n_ts, n_x, n_y, n_z, 2]. n_ts, n_x, n_y, n_z represent the number of time-points, the number of calculation units for searchlight along the x, y, z axis and 2 represents a t-value and a p-value.

Return type

array

Notes

n_subs must >= 4 (n_subs!/(2!*(n_subs-2)!) >= 6).

neurora.stats_cal.stats_stps(corrs1, corrs2, fisherz=True, permutation=True, iter=1000)

Conduct the statistical analysis for results of EEG-like data(for STPS)

Parameters
  • corrs1 (array) – The correlation coefficients under condition1. The shape of corrs1 must be [n_subs, n_chls, n_ts]. n_subs, n_chls, n_ts represent the number of subjects, the number of channels and the number of time-points.

  • corrs2 (array) – The correlation coefficients under condition2. The shape of corrs2 must be [n_subs, n_chls, n_ts]. n_subs, n_chls, n_ts represent the number of subjects, the number of channels and the number of time-points.

  • fisherz (bool True or False. Default is True.) – Conduct Fisher-Z transform.

  • permutation (bool True or False. Default is False.) – Use permutation test or not.

  • iter (int. Default is 1000.) – The times for iteration.

Returns

stats – The statistical results. The shape of stats is [n_chls, n_ts, 2]. n_chls, n_ts represent the number of channels and the number of time-points. 2 represents a t-value and a p-value.

Return type

array

Notes

n_subs must >= 6.

neurora.stats_cal.stats_stpsfmri(corrs1, corrs2, fisherz=True, permutation=False, iter=1000)

Conduct the statistical analysis for results of fMRI data (STPS searchlight)

Parameters
  • corrs1 (array) – The correlation coefficients under condition1. The shape of corrs1 must be [n_subs, n_x, n_y, n_z]. n_subs, n_x, n_y, n_z represent the number of subjects, the number of calculation units for searchlight along the x, y, z axis.

  • corrs2 (array) – The correlation coefficients under condition2. The shape of corrs2 must be [n_subs, n_x, n_y, n_z]. n_subs, n_x, n_y, n_z represent the number of subjects, the number of calculation units for searchlight along the x, y, z axis.

  • fisherz (bool True or False. Default is True.) – Conduct Fisher-Z transform.

  • permutation (bool True or False. Default is False.) – Use permutation test or not.

  • iter (int. Default is 1000.) – The times for iteration.

Returns

stats – The statistical results. The shape of stats is [n_x, n_y, n_z, 2]. n_x, n_y, n_z represent the number of calculation units for searchlight along the x, y, z axis and 2 represents a t-value and a p-value.

Return type

array

Notes

n_subs must >= 6.