PermuteMarginalModel: PermuteMarginalModel - This permutation function that will...

Description Usage Arguments Examples

View source: R/PermuteMarginalModel.R

Description

This function wraps all of the other functions in the MarginalModelCifti package. The output is a text file containing the permutation tests.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
PermuteMarginalModel(
  external_df,
  concfile,
  structtype,
  structfile,
  matlab_path,
  surf_command,
  wave = NULL,
  notation,
  zcor = NULL,
  corstr = NULL,
  family_dist = NULL,
  dist_type = "radenbacher",
  z_thresh = 2.3,
  nboot = 1000,
  p_thresh = 0.5,
  sigtype = "cluster",
  id_subjects = "subid",
  output_directory = "~/",
  fastSwE = TRUE,
  adjustment = NULL,
  norm_external_data = TRUE,
  norm_internal_data = TRUE,
  marginal_outputs = FALSE,
  marginal_matrix = NULL,
  enrichment_path = NULL,
  modules = NULL,
  wb_command = "wb_command",
  subsetfile = NULL,
  output_permfile = "~/permfile.txt"
)

Arguments

external_df

A data frame comprising non-brain measures to model. Can be specified as a string to a csv file with appropriate headers.

concfile

A character string denoting a single column text file that lists the dscalars in the same order as the external_df and wave frames.

structtype

A character string denoting whether the map is volumetric ('volume'), surface-based ('surface'), a pconn ('pconn'), or a niiconn ('niiconn').

structfile

A character string denoting the structural map file, used for cluster detection on surfaces only.

matlab_path

A character string denoting the path to the matlab compiler. Please use v91.

surf_command

A character string denoting the path to the SurfConnectivity command.

wave

A data frame comprising the order of the waves (longitudinal measures) for each independent case.

notation

A character string representing the model formula. Uses Wilkinson notation.

zcor

A matrix defining the correlation structure set by the user, can be used to specify custom dependencies (e.g. site or kinship matrices).

corstr

A character string that defines the correlation structure in a predetermined way. "Independence" is recommend for most cases.

family_dist

A character string denoting the assumed underlying distribution of all input data.

dist_type

A character string denoting the distribution to use for the wild bootstrap.

z_thresh

A numeric that represents the threshold for Z statistics when performing cluster detection.

nboot

A numeric that represents the number of wild bootstraps to perform.

p_thresh

A numeric that represents the p value threshold for assessing significance.

sigtype

A character string denoting cluster ('cluster'), point ('point'), or enrichment ('enrichment') comparisons.

id_subjects

A character string denoting the column for the subject ID. Only needed when FastSwE is FALSE

output_directory

A character string denoting the path to the output permutation tests

adjustment

A character string denoting the small sample size adjustment to use when fastSwE is set to TRUE. Is NULL by default.

norm_external_data

A boolean. If set to true, external data will be normed prior to analysis.

norm_internal_data

A boolean. If set to true, MRI data will be normed per datapoint prior to analysis.

marginal_outputs

A boolean. If set to true, marginal values will be output as statistical maps

marginal_matrix

A numeric matrix depicting how to draw the map. Only needed if marginal_outputs is set to TRUE

enrichment_path

A string depicting the path to the enrichment code. Used for enrichment analysis only (i.e. when sigtype is set to 'enrichment').

modules

A csv file or array that depicts the modules for the enrichment analysis.

wb_command

A character string denoting the path to the wb_command file

subsetfile

A character string denoting the path to a subset selection file, to select only a subset of the participants

fastSWE

A boolean that determine the sandwhich estimator approach. If set to FALSE, will use standard R package geeglm. If set to TRUE will use custom-built estimator using rfast.

Examples

1
2
max_cc <- ComputeMM_WB(cifti_map,zscore_map,resid_map,fit_map,type,external_df,
notation,family_dist,structtype,thresh,structfile,matlab_path,surf_command,correctiontype)

DCAN-Labs/MarginalModelCIFTI documentation built on Nov. 30, 2021, 3:40 p.m.