Description Usage Arguments Examples
View source: R/ConstructMarginalModel.R
This function wraps all of the other functions in the MarginalModelCifti package. The output is a significance map, which is either uncorrected or cluster detection was performed.
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 32 33 34 35 | ConstructMarginalModel(
external_df,
concfile,
structtype,
structfile,
matlab_path,
surf_command,
wave = NULL,
notation = formula(y ~ x),
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 = "~/",
ncores = 1,
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,
permutation_directory = NULL,
analysismode = "full",
checkorder = TRUE,
roisubset = NULL
)
|
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 NIFTI connectivity matrix ('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 MRI statistical maps |
ncores |
An integer denoting the number of CPU cores to use when conducting 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 |
permutation_directory |
A character string denoting the path to the directory containing ONLY permutation tests. If set to NULL, permutation tests will be generated on the fly |
analysismode |
A character string denoting how much of the analysis to perform. Can be set to "full" to include cluster detection and permutation testing, or set to "statmaponly" to only output statistical maps |
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. |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.