Perform independent sample and paired sample t-tests between two numerfor differences between means of brain imaging phenotypes for a categorical variable. For most scenarios, the user does not need to call this function directly. This function will be called internally from bstr_ttest()

ttest_vec(X1, X2, group_var, paired = FALSE)

Arguments

X1

matrix of dimensions (\(N1 x T\)), where \(N1\) = number of subjects and \(T\) = number of vertices/voxels.

X2

matrix of dimensions (\(N2 x T\)), where \(N2\) = number of subjects and \(T\) = number of vertices/voxels.

group_var

Categorical variable name. This should be present in the demographics csv file associated with bstr_data.

paired

logical; is TRUE if group_var contains matching (dependent) samples. The default value is FALSE.

Details

For an independent samples t-test \(N1\) not equal to \(N2\). For a dependent (paired) samples t-test, \(N1 = N2\). The degrees of freedom are calculated using the Welch–Satterthwaite approximation by default. bstr_data can be of the type "sba", "tbm", or "roi".