murHC4m: Mass Univariate Regression using HC4m estimator.

View source: R/murHC4m.R

murHC4mR Documentation

Mass Univariate Regression using HC4m estimator.

Description

Fit a linear regression model at each vertex of a 3D atlas. HC4m estimator is used to correct for heteroskedastic data. Inputs of the function are a NxC matrix X modeling an effect under study (N = number of subjects, C = number of variables + intercept term), a NxV imaging matrix Y containing the values of a 3D phenotype at each atlas vertex (V = number of vertices in the 3D mesh), and an array (extract) containg the positions of variables in X of which extract the informations of interest. The output is a Vx(3xlength(extract)) matrix containing the regression coefficient, its related t-statistic and the p-value at each vertex of the computational model for each variable specifiec in extract.

Usage

murHC4m(X, Y, extract)

Arguments

X

is the design matrix. Number of rows = number of subjects in the study, number of columns = number of vertices in the atlas. Numerical varable must be normalized to 0-mean and unit-standard deviation. Categorical variables must be coded using dummy coding. The first column should contain the intercept (all 1s).

Y

is the imaging matrix. Number of rows = N. Number of columns = V.

extract

is an array expressing which covariates in X you want to extract.

Examples

extract <- c(1,3) #extract the first and third covariate.
result <- murHC4m(X, Y, extract)
betas <- result[,1]
tstatistics <- result[,2]
pvalues <- result[,3]

UK-Digital-Heart-Project/mutools3D documentation built on March 18, 2024, 3:13 a.m.