nimare.meta.cbmr.CBMRInference

class CBMRInference(device='cpu')[source]

Bases: object

Statistical inference on outcomes of CBMR.

Added in version 0.1.0.

(intensity estimation and study-level moderator regressors)

Parameters:
  • result (CBMREstimator) – Results of optimized regression coefficients of CBMR, as well as their standard error in tables. Results of estimated spatial intensity function (per study) in maps.

  • t_con_groups (bool or obj:list or obj:None, optional) – Contrast matrix for homogeneity test or group comparison on estimated spatial intensity function. For boolean inputs, no statistical inference will be conducted for spatial intensity if t_con_groups is False, and spatial homogeneity test for groupwise intensity function will be conducted if t_con_groups is True. For list inputs, generialized linear hypothesis (GLH) testing will be conducted for each element independently. We also allow any element of t_con_groups in list type, which represents GLH is conducted for all contrasts in this element simultaneously. Default is homogeneity test on group-wise estimated intensity function.

  • t_con_moderators (bool or obj:list or obj:None, optional) – Contrast matrix for testing the existence of one or more study-level moderator effects. For boolean inputs, no statistical inference will be conducted for study-level moderators if t_con_moderatorss is False, and statistical inference on the effect of each study-level moderators will be conducted if t_con_groups is True. For list inputs, generialized linear hypothesis (GLH) testing will be conducted for each element independently. We also allow any element of t_con_moderatorss in list type, which represents GLH is conducted for all contrasts in this element simultaneously. Default is statistical inference on the effect of each study-level moderators

  • device (string, optional) – Device type (‘cpu’ or ‘cuda’) represents the device on which operations will be allocated. Default is ‘cpu’.

Methods

create_contrast(contrast_name[, source])

Create contrast matrix for generalized hypothesis testing (GLH).

create_regular_expressions()

Create regular expressions for parsing contrast names.

display()

Display Groups and Moderator names and order.

fit(result)

Fit CBMRInference instance.

fit_transform(result[, t_con_groups, ...])

Fit and transform.

transform([t_con_groups, t_con_moderators])

Conduct generalized linear hypothesis (GLH) testing on CBMR estimates.

create_contrast(contrast_name, source='groups')[source]

Create contrast matrix for generalized hypothesis testing (GLH).

(1) if source is “group”, create contrast matrix for GLH on spatial intensity; if contrast_name begins with ‘homo_test_’, followed by a valid group name, create a contrast matrix for one-group homogeneity test on spatial intensity; if contrast_name comes in the form of “group1VSgroup2”, with valid group names “group1” and “group2”, create a contrast matrix for group comparison on estimated group spatial intensity; (2) if source is “moderator”, create contrast matrix for GLH on study-level moderators; if contrast_name begins with ‘moderator_’, followed by a valid moderator name, we create a contrast matrix for testing if the effect of this moderator exists; if contrast_name comes in the form of “moderator1VSmoderator2”, with valid moderator names “modeator1” and “moderator2”, we create a contrast matrix for testing if the effect of these two moderators are different.

Parameters:

contrast_name (string) – Name of contrast in GLH.

create_regular_expressions()[source]

Create regular expressions for parsing contrast names.

creates the following attributes: self.groups_regular_expression: regular expression for parsing group names self.moderators_regular_expression: regular expression for parsing moderator names

usage: >>> self.groups_regular_expression.match(“group1 - group2”).groupdict()

display()[source]

Display Groups and Moderator names and order.

fit(result)[source]

Fit CBMRInference instance.

Parameters:

result (CBMREstimator) – Results of optimized regression coefficients of CBMR, as well as their standard error in tables. Results of estimated spatial intensity function (per study) in maps.

fit_transform(result, t_con_groups=None, t_con_moderators=None)[source]

Fit and transform.

transform(t_con_groups=None, t_con_moderators=None)[source]

Conduct generalized linear hypothesis (GLH) testing on CBMR estimates.

Estimate group-wise spatial regression coefficients and its standard error via inverse Fisher Information matrix, estimate standard error of group-wise log intensity, group-wise intensity via delta method. For NB or clustered model, estimate regression coefficient of overdispersion. Similarly, estimate regression coefficient of study-level moderators (if exist), as well as its standard error via Fisher Information matrix. Save these outcomes in tables. Also, estimate group-wise spatial intensity (per study) and save the results in maps.

Parameters:
  • t_con_groups (list, optional) – Contrast matrix for GLH on group-wise spatial intensity estimation. Default is None (group-wise homogeneity test for all groups).

  • t_con_moderators (list, optional) – Contrast matrix for GLH on moderator effects. Default is None (tests if moderator effects exist for all moderators).

Examples using nimare.meta.cbmr.CBMRInference

Coordinate-based meta-regression algorithms

Coordinate-based meta-regression algorithms