network_lm: network_lm

View source: R/network_level_lm.R

network_lmR Documentation

network_lm

Description

mass univariate linear regression at the network level

Usage

network_lm(
  model,
  contrast,
  FC_data,
  threshold.method = "fdr",
  perm = TRUE,
  nperm = 1000
)

Arguments

model

A data.frame or matrix containing all the predictors in the model

contrast

The predictor of interest. The edge- and network-wise statistics will only be estimated for this predictor

FC_data

An N x E matrix containing the vectorized edges; where N = number of subjects, E=number of edges

threshold.method

method for correcting for multiple tests. set to fdr by default

perm

If set to TRUE, p values will be calculated using a permutation approach by shuffling subjects' labels, before correcting for FDR. Set to TRUE by default

nperm

number of permutations to use if perm=TRUE.

Details

This function first summarizes the FC edges into their respective networks and then carry out mass univariate linear regression analyses on each of the network to network connection

Value

A data.frame object with coef and corrected p values

Examples

demomat=get('demomat')
contrast=c(1,1,2,2)
random=c('sub1','sub2','sub3','sub4')
model1=network_lm(model=contrast, 
                 contrast=contrast, 
                 FC_data=demomat, 
                 nperm=1)

FCtools documentation built on Sept. 15, 2026, 5:09 p.m.