diff --git a/DESCRIPTION b/DESCRIPTION index 40955ee..f2bd94e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: ModelArray Title: An R package for statistical analysis of fixel-wise data and beyond -Version: 0.1.4.9000 +Version: 0.1.5 Authors@R: c(person(given = "Chenying", family = "Zhao", diff --git a/docs/404.html b/docs/404.html index 93a887c..41a3467 100644 --- a/docs/404.html +++ b/docs/404.html @@ -24,7 +24,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/CLONE.html b/docs/CLONE.html index b843f75..2a48d67 100644 --- a/docs/CLONE.html +++ b/docs/CLONE.html @@ -10,7 +10,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 626a47e..5a56e31 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -10,7 +10,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/articles/basic_r_intro.html b/docs/articles/basic_r_intro.html index c854903..6974b95 100644 --- a/docs/articles/basic_r_intro.html +++ b/docs/articles/basic_r_intro.html @@ -26,7 +26,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/articles/container.html b/docs/articles/container.html index 10abd5e..b61c436 100644 --- a/docs/articles/container.html +++ b/docs/articles/container.html @@ -26,7 +26,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/articles/debugging.html b/docs/articles/debugging.html index c2f0f55..e9c96e9 100644 --- a/docs/articles/debugging.html +++ b/docs/articles/debugging.html @@ -26,7 +26,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/articles/doc_for_developer.html b/docs/articles/doc_for_developer.html index ba70290..8ec105d 100644 --- a/docs/articles/doc_for_developer.html +++ b/docs/articles/doc_for_developer.html @@ -26,7 +26,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/articles/faq.html b/docs/articles/faq.html index 42310a1..876800c 100644 --- a/docs/articles/faq.html +++ b/docs/articles/faq.html @@ -26,7 +26,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/articles/index.html b/docs/articles/index.html index 51af5ab..ecccbf5 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -10,7 +10,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/articles/installations.html b/docs/articles/installations.html index 4353ca7..2db40f7 100644 --- a/docs/articles/installations.html +++ b/docs/articles/installations.html @@ -26,7 +26,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/articles/voxel-wise_data.html b/docs/articles/voxel-wise_data.html index 390f00f..61f730d 100644 --- a/docs/articles/voxel-wise_data.html +++ b/docs/articles/voxel-wise_data.html @@ -26,7 +26,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/articles/walkthrough.html b/docs/articles/walkthrough.html index 46f7e0e..41cec40 100644 --- a/docs/articles/walkthrough.html +++ b/docs/articles/walkthrough.html @@ -26,7 +26,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/authors.html b/docs/authors.html index 328825f..e6bfae9 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -10,7 +10,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 @@ -73,13 +73,13 @@ Citation Zhao C, Tapera T, Cieslak M, Satterthwaite T (2023). ModelArray: An R package for statistical analysis of fixel-wise data and beyond. -R package version 0.1.4.9000, https://pennlinc.github.io/ModelArray. +R package version 0.1.5, https://pennlinc.github.io/ModelArray. @Manual{, title = {ModelArray: An R package for statistical analysis of fixel-wise data and beyond}, author = {Chenying Zhao and Tinashe Tapera and Matthew Cieslak and Theodore Satterthwaite}, year = {2023}, - note = {R package version 0.1.4.9000}, + note = {R package version 0.1.5}, url = {https://pennlinc.github.io/ModelArray}, } diff --git a/docs/index.html b/docs/index.html index fc2f0de..92ebb73 100644 --- a/docs/index.html +++ b/docs/index.html @@ -26,7 +26,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 3416a87..89750e6 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -10,7 +10,7 @@ articles: installations: installations.html voxel-wise_data: voxel-wise_data.html walkthrough: walkthrough.html -last_built: 2023-12-14T23:49Z +last_built: 2023-12-18T19:46Z urls: reference: https://pennlinc.github.io/ModelArray/reference article: https://pennlinc.github.io/ModelArray/articles diff --git a/docs/reference/ModelArray.gam.html b/docs/reference/ModelArray.gam.html index e8b7502..e19d1ac 100644 --- a/docs/reference/ModelArray.gam.html +++ b/docs/reference/ModelArray.gam.html @@ -10,7 +10,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/reference/ModelArray.html b/docs/reference/ModelArray.html index 2753a49..89d92e0 100644 --- a/docs/reference/ModelArray.html +++ b/docs/reference/ModelArray.html @@ -12,7 +12,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/reference/ModelArray.lm.html b/docs/reference/ModelArray.lm.html index 2cd07c2..25f0af8 100644 --- a/docs/reference/ModelArray.lm.html +++ b/docs/reference/ModelArray.lm.html @@ -10,7 +10,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/reference/analyseOneElement.gam.html b/docs/reference/analyseOneElement.gam.html index 28fa2cf..a5a4ec5 100644 --- a/docs/reference/analyseOneElement.gam.html +++ b/docs/reference/analyseOneElement.gam.html @@ -10,7 +10,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/reference/analyseOneElement.lm.html b/docs/reference/analyseOneElement.lm.html index 0b090d0..5934f02 100644 --- a/docs/reference/analyseOneElement.lm.html +++ b/docs/reference/analyseOneElement.lm.html @@ -10,7 +10,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/reference/generator_gamFormula_continuousInteraction.html b/docs/reference/generator_gamFormula_continuousInteraction.html index 04687be..8d76121 100644 --- a/docs/reference/generator_gamFormula_continuousInteraction.html +++ b/docs/reference/generator_gamFormula_continuousInteraction.html @@ -14,7 +14,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/reference/generator_gamFormula_factorXsmooth.html b/docs/reference/generator_gamFormula_factorXsmooth.html index 3a8d5bb..aac1363 100644 --- a/docs/reference/generator_gamFormula_factorXsmooth.html +++ b/docs/reference/generator_gamFormula_factorXsmooth.html @@ -14,7 +14,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/reference/index.html b/docs/reference/index.html index c4dc3a2..bbf2451 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -10,7 +10,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/reference/numElementsTotal.html b/docs/reference/numElementsTotal.html index ca2fe67..a9bc4ec 100644 --- a/docs/reference/numElementsTotal.html +++ b/docs/reference/numElementsTotal.html @@ -10,7 +10,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/reference/pipe.html b/docs/reference/pipe.html index e33fdef..1bd48f8 100644 --- a/docs/reference/pipe.html +++ b/docs/reference/pipe.html @@ -10,7 +10,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/reference/results-ModelArray-method.html b/docs/reference/results-ModelArray-method.html index 2b15ad7..32ab8c6 100644 --- a/docs/reference/results-ModelArray-method.html +++ b/docs/reference/results-ModelArray-method.html @@ -10,7 +10,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/reference/scalars-ModelArray-method.html b/docs/reference/scalars-ModelArray-method.html index 5d1988f..e49e3b9 100644 --- a/docs/reference/scalars-ModelArray-method.html +++ b/docs/reference/scalars-ModelArray-method.html @@ -10,7 +10,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/reference/show-ModelArray-method.html b/docs/reference/show-ModelArray-method.html index c24c312..db62dff 100644 --- a/docs/reference/show-ModelArray-method.html +++ b/docs/reference/show-ModelArray-method.html @@ -10,7 +10,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/reference/sources-ModelArray-method.html b/docs/reference/sources-ModelArray-method.html index 5be40f1..e5e9ef3 100644 --- a/docs/reference/sources-ModelArray-method.html +++ b/docs/reference/sources-ModelArray-method.html @@ -10,7 +10,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/reference/writeResults.html b/docs/reference/writeResults.html index 1394897..42302d2 100644 --- a/docs/reference/writeResults.html +++ b/docs/reference/writeResults.html @@ -10,7 +10,7 @@ ModelArray - 0.1.4.9000 + 0.1.5 diff --git a/docs/search.json b/docs/search.json index 27c6efc..0adb41d 100644 --- a/docs/search.json +++ b/docs/search.json @@ -1 +1 @@ -[{"path":"https://pennlinc.github.io/ModelArray/articles/basic_r_intro.html","id":"r-syntax","dir":"Articles","previous_headings":"","what":"R syntax","title":"An intro to R","text":"Dot “.” valid variable name function (e.g. variable element.subset, function ModelArray.lm()) Syntax formula: example formula: can see even though define variable “FD”,“age” “sex”, ’s valid formula. Left hand side “~” dependent variable (y, response), right hand side includes independent variables / covariates.","code":"formula <- FD ~ age + sex"},{"path":"https://pennlinc.github.io/ModelArray/articles/basic_r_intro.html","id":"prepare-the-phenotypes-data-frame-manipulations","dir":"Articles","previous_headings":"","what":"Prepare the phenotypes data.frame: manipulations","title":"An intro to R","text":"may want manipulate data.frame phenotypes passing ModelArray.lm() etc functions model fitting. Examples like de-mean rescale covariates. R package dplyr useful easy use manipulation.","code":"# install is first via: install.packages(\"dplyr\") library(dplyr) # load into memory #> #> Attaching package: 'dplyr' #> The following objects are masked from 'package:stats': #> #> filter, lag #> The following objects are masked from 'package:base': #> #> intersect, setdiff, setequal, union"},{"path":"https://pennlinc.github.io/ModelArray/articles/container.html","id":"preface","dir":"Articles","previous_headings":"","what":"Preface","title":"Getting started with containers","text":"Target audience: user wants use container run ModelArray /ConFixel covered page? use container image ModelArray + ConFixel. covered page? Step step details run ModelArray ConFixel. full walkthrough use software, please refer vignette(\"walkthrough\"). highly suggest reviewing page ’re new ModelArray.","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/container.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Getting started with containers","text":"Besides running ModelArray ConFixel local computer, users also option run High Performance Computing (HPC) clusters. using HPC clusters, users may full privilege install dependent packages. Therefore, provide option download software container image includes ModelArray + ConFixel. container image publicly available Docker Hub. Although HPC clusters usually support docker commands, container image can run singularity commands, usually available HPC clusters (see details).","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/container.html","id":"using-singularity-to-run-on-hpc-clusters","dir":"Articles","previous_headings":"","what":"Using singularity to run on HPC clusters","title":"Getting started with containers","text":"Prerequisite: Singularity installed cluster. , please contact cluster’s administrator.","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/container.html","id":"pull-the-container-from-docker-hub","dir":"Articles","previous_headings":"Using singularity to run on HPC clusters","what":"Pull the container from Docker Hub","title":"Getting started with containers","text":"first pull container Docker Hub using singularity pull command follows: replace actual tag, e.g., 0.1.2, latest. see singularity image (.sif) current directory: modelarray_confixel_.sif pulling, let’s make sure can singularity run image: now inside R environment capability load ModelArray R package RStudio: library(ModelArray). also way interactively use container image run R, please make sure mount necessary directories -B - see explanations.","code":"singularity pull docker://pennlinc/modelarray_confixel: singularity run --cleanenv \\ modelarray_confixel_.sif \\ R"},{"path":"https://pennlinc.github.io/ModelArray/articles/container.html","id":"how-to-run-the-container","dir":"Articles","previous_headings":"Using singularity to run on HPC clusters","what":"How to run the container?","title":"Getting started with containers","text":": -B /directory///data allows mount data directory singularity can read write data inside . data exists inside current working directory, might -B $PWD; /path//singularity/image/modelarray_confixel_.sif full path singularity image (.sif) pulled; ModelArray ConFixel included container. run ConFixel, simply replace ConFixel commands (e.g., confixel). run ModelArray, may first save R commands R script, replace Rscript /path///Rscript. Make sure Rscript mounted (-B), , e.g., ’s directory /directory///data, please : -B /directory///data,/directory//Rscript. See mount multiple directories. might submit command singularity run job running cluster compute node.","code":"singularity run --cleanenv -B /directory/of/your/data \\ /path/to/singularity/image/modelarray_confixel_.sif \\ "},{"path":"https://pennlinc.github.io/ModelArray/articles/container.html","id":"more-information","dir":"Articles","previous_headings":"","what":"More information?","title":"Getting started with containers","text":"provided detailed example walkthrough ModelArray ConFixel : vignette(\"walkthrough\"). Please refer page tutorial use ModelArray ConFixel.","code":""},{"path":[]},{"path":"https://pennlinc.github.io/ModelArray/articles/debugging.html","id":"this-analysis-myanalysis-does-not-exist","dir":"Articles","previous_headings":"ModelArray()","what":"“This analysis: myAnalysis does not exist…”","title":"Debugging","text":"calling ModelArray(h5_path, scalar_types = c(\"FDC\")): One possible reason happens , HDF5 file want “load” results, specify result name, makes ModelArray() function uses default name myAnalysis result name . issue happens frequently want test R script results saved HDF5 file; next time run script, result name specified ModelArray() causes error. One way avoid make backup original HDF5 file, want use input, make copy running ModelArray().","code":"Error in ModelArray(h5_path, scalar_types = c(\"FDC\")) : This analysis: myAnalysis does not exist... Execution halted"},{"path":"https://pennlinc.github.io/ModelArray/articles/doc_for_developer.html","id":"overview","dir":"Articles","previous_headings":"","what":"Overview","title":"Developer documentation","text":"ModelArray R package supports data Hierarchical Data Format 5 (HDF5) file format. utilizes DelayedArray HDF5Array R packages, statistical analysis can performed without loading original data HDF5 file memory. makes ModelArray efficient memory usage. details, please see section “ModelArray Construction” . Methods showing accessing ModelArray object basic. Please see section “Show accessors methods ModelArray class” . key function ModelArray package perform statistical analysis. details, please see section “Model fitting” . describe save statistical results HDF5 file disk. Furthermore, describe unit tests needed quality assurance. Finally describe building Docker image.","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/doc_for_developer.html","id":"modelarray-construction","dir":"Articles","previous_headings":"","what":"ModelArray Construction","title":"Developer documentation","text":"first define class called ModelArray using setClass(). ModelArray object (.e. instance ModelArray class) several slots: sources: source filenames (e.g., list .mif files fixel-wise data) scalars: scalar matrix (matrices) results: statistical result matrices () path: path h5 file disk key feature ModelArray object memory efficient. entire dataset HDF5 (.h5) file loaded memory; minimal data loaded. achieve , first need ModelArraySeed(), utilizes HDF5Array::HDF5ArraySeed(), acting pointer .hdf5 file disk. make arrays ModelArray object look like “real” arrays, e.g. common array operations indexing transposing can applied, utilize package DelayedArray wraps data -disk HDF5 file DelayedArray object. Finally ModelArray class defined integrating slots together. done ModelArray() function. functions setups can found script R/ModelArray_Constructor.R","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/doc_for_developer.html","id":"show-and-accessors-methods-of-modelarray-class","dir":"Articles","previous_headings":"","what":"Show and accessors methods of ModelArray class","title":"Developer documentation","text":"easily show access ModelArray object, adopt S4 Object Oriented Programming (OOP) model. End users R actually using S4 methods frequently. example, showing (summarized) content object, users simply enter name R console press “enter”. hood, uses generic show() method. showing ModelArray object, adopt way. show() already generic function, need setMethod() setup. S4 OOP model, users can easily access data need. current accessor functions accessing different slots ModelArray class’s: sources(): source filenames (e.g., list .mif files fixel-wise data) scalars(): scalar matrix (matrices) results(): statistical result matrix matrices () use setMethod() define methods. Unlike show(), accessors generic yet, additional step setGeneric(). show accessors setups can found script R/ModelArray_S4Methods.R.","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/doc_for_developer.html","id":"model-fitting","dir":"Articles","previous_headings":"","what":"Model fitting","title":"Developer documentation","text":"Functions ModelArray.lm() ModelArray.gam() model fitting. hood, functions iteratively call analyseOneElement.lm() analyseOneElement.gam() fitting one element, respectively. also facilitates parallel computing across elements requested. Besides existing functions linear models (ModelArray.lm()) GAMs (ModelArray.gam()), new functions diverse statistical models can added following structure . general structure model fitting functions ModelArray.() ModelArray : sanity checks arguments Print important methods model fitting, method mgcv::gam() GAMs First, initialize: run analyseOneElement.() get column names statistics output statistics; usually using element middle (instead first last element) avoid many NaNs data; Fit model element; Get necessary statistics via broom::tidy(), broom::glance(), /summary(). Flatten results one row data.frame element; add element ids; remove column names (’s list numeric now) save bit memory Return result element Concatenate results requested elements matrix elements statistics, add column names; now get final result data.frame p-value correction method, apply add values result data.frame Return result data.frame ModelArray.gam(), additional step one round iteration: Iteratively call analyseOneElement.() providing reduced formula Get necessary statistics Compute delta adjusted R-squared partial R-squared; add previously got data.frame Therefore, might two rounds iterations model fitting ModelArray.gam(), depending number terms user requested changed.rsq.term.index. Functions mentioned section can found scripts R/analyse.R R/ModelArray_Constructor.R.","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/doc_for_developer.html","id":"saving-statistical-results-to--hdf5-file-on-disk","dir":"Articles","previous_headings":"","what":"Saving statistical results to .hdf5 file on disk","title":"Developer documentation","text":"getting data.frame statistical results, users save original HDF5 file disk. function writeResults() located script R/ModelArray_Constructor.R","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/doc_for_developer.html","id":"writing-tests-for-circleci","dir":"Articles","previous_headings":"","what":"Writing tests for CircleCI","title":"Developer documentation","text":"use Continuous Integration (CI) testing ensure stability quality assurance ModelArray. Therefore, modify source code ModelArray, important make sure add appropriate tests new modified functionality. test files located folder tests/testthat. commit pushed GitHub, CircleCI (CI testing platform) triggered build software run unit tests. tests serve goals : Run functions different scenarios (different requests) expect error. ensure new features added, run without error; ** scenarios, special data needed. example, testing NAs input data (volume data) Expect output data.frame contain column specific name, check dimensions output data.frame. ensure expected columns show . importantly, check values expected: statistical results calculated ModelArray fitting loop = calculated standard R. Developers can run tests locally see unit tests test file (tests/testthat folder) can run without errors: click “Run Test” button RStudio run test file. Check anything failed. details write unit tests + test , please check Testing chapters book “R Packages” written Hadley Wickham, Jennifer Bryan","code":"rm(list=ls()) devtools::load_all()"},{"path":"https://pennlinc.github.io/ModelArray/articles/doc_for_developer.html","id":"building-the-docker-image-for-modelarray-confixel","dir":"Articles","previous_headings":"","what":"Building the Docker image for ModelArray + ConFixel","title":"Developer documentation","text":"Dockerfile Docker image can found root folder GitHub repository ModelArray. CircleCI automatically build Docker image push Docker Hub GitHub commit merge main branch, version tagged. See .circleci/config.yml file details setups.","code":""},{"path":[]},{"path":"https://pennlinc.github.io/ModelArray/articles/faq.html","id":"what-kind-of-fixel-wise-data-should-i-use","dir":"Articles","previous_headings":"Prepare your data for ModelArray","what":"What kind of fixel-wise data should I use?","title":"FAQ","text":"using ModelArray, stage got fixel-wise data every participant template space MRtrix following fixel-based analysis. use paper Dhollander et al., 2021 Fig.3. fixel-based analysis pipeline example, expect done step “Connectivity-based fixel smoothing”. use participant-level fixel-wise data template space step fixel-wise statistical analysis ModelArray. expect file format mif.","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/faq.html","id":"how-should-i-organize-the-data","dir":"Articles","previous_headings":"Prepare your data for ModelArray","what":"How should I organize the data?","title":"FAQ","text":"example data organization shown demo data (see vignette(\"walkthrough\")) recommend. example fixel-wise dataset, metric FDC. also metrics FC, may also folder FC CSV file cohort_FC_n100.csv myProject folder.","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/faq.html","id":"what-are-the-requirements-of-the-csv-file","dir":"Articles","previous_headings":"Prepare your data for ModelArray","what":"What are the requirements of the CSV file?","title":"FAQ","text":"expect CSV file least contains two columns - see example vignette(\"walkthrough\"), required columns highlighted bold italics: scalar_name, tells ModelArray metric analyzed source_file, tells ModelArray mif file used subject columns covariates may want include statistical model. order columns can changed.","code":""},{"path":[]},{"path":"https://pennlinc.github.io/ModelArray/articles/faq.html","id":"how-many-cpu-cores-does-my-computer-have","dir":"Articles","previous_headings":"When using ModelArray.*() for statistical analysis","what":"How many CPU cores does my computer have?","title":"FAQ","text":"may check : parallel::detectCores()","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/installations.html","id":"set-up-a-conda-environment","dir":"Articles","previous_headings":"","what":"Set up a conda environment","title":"Installation","text":"first create conda environment modelarray installing companion software ConFixel etc. ’ll install python version 3.9:","code":"foo@bar:~$ conda create --name modelarray python=3.9 foo@bar:~$ conda activate modelarray"},{"path":"https://pennlinc.github.io/ModelArray/articles/installations.html","id":"install-mrtrix-only-required-for-fixel-wise-data","dir":"Articles","previous_headings":"","what":"Install MRtrix (Only required for fixel-wise data)","title":"Installation","text":"converting fixel-wise data’s format (.mif), ConFixel uses function mrconvert MRtrix, please make sure MRtrix installed. can either installed via conda conda environment just created, compiled source. See MRtrix’s webpage . Type mrview terminal check whether MRtrix installation successful. input data voxel-wise data, can skip step.","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/installations.html","id":"install-hdf5-libraries-in-the-system","dir":"Articles","previous_headings":"","what":"Install HDF5 libraries in the system","title":"Installation","text":"ModelArray works Hierarchical Data Format 5 (HDF5) file format, need make sure necessary libraries HDF5 installed system.","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/installations.html","id":"on-a-linux-ubuntu-system","dir":"Articles","previous_headings":"Install HDF5 libraries in the system","what":"On a Linux Ubuntu system","title":"Installation","text":"’re Linux Ubuntu system: First, please check libhdf5-dev installed system: got one line outputs, congrats, libhdf5-dev installed. Otherwise, please install via:","code":"foo@bar:~$ ldconfig -p | grep libhdf5* foo@bar:~$ sudo apt-get update -y foo@bar:~$ sudo apt-get install -y libhdf5-dev"},{"path":"https://pennlinc.github.io/ModelArray/articles/installations.html","id":"on-a-macos-system","dir":"Articles","previous_headings":"Install HDF5 libraries in the system","what":"On a macOS system","title":"Installation","text":"Use Homebrew install: details may refer webpage ","code":"foo@bar:~$ brew install hdf5"},{"path":"https://pennlinc.github.io/ModelArray/articles/installations.html","id":"install-confixel-python-package-from-github","dir":"Articles","previous_headings":"","what":"Install ConFixel python package from GitHub","title":"Installation","text":"ConFixel provides file format conversion fixel-wise data (.mif) voxel-wise data (NIfTI). Follow commands install GitHub:","code":"# We first activate the conda environment we just created: foo@bar:~$ conda activate modelarray # Then install ConFixel: foo@bar:~$ cd ~/myProject foo@bar:myProject$ git clone https://github.com/PennLINC/ConFixel.git foo@bar:myProject$ cd ConFixel foo@bar:myProject$ pip install . # You may remove the original source code if you are an end user instead of a developer: foo@bar:myProject$ cd .. foo@bar:myProject$ rm -r ConFixel"},{"path":"https://pennlinc.github.io/ModelArray/articles/installations.html","id":"install-r","dir":"Articles","previous_headings":"","what":"Install R","title":"Installation","text":"ModelArray requires R >=4.1.2, currently tests ModelArray R 4.1.2. already installed , can skip step. don’t, may download CRAN.","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/installations.html","id":"optional-install-rstudio","dir":"Articles","previous_headings":"","what":"(Optional) Install RStudio","title":"Installation","text":"RStudio provides good IDE using R. However ’s optional install RStudio. haven’t got one want install , may download .","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/installations.html","id":"install-modelarray-r-package-from-github","dir":"Articles","previous_headings":"","what":"Install ModelArray R package from GitHub","title":"Installation","text":"ModelArray R package’s source code available GitHub. install R: Now, ModelArray ready use:","code":"# First, load library \"devtools\": library(devtools) # if you got error, it means you don't have devtools installed, please install it by: install.packages(\"devtools\") # Then, install ModelArray: devtools::install_github(\"PennLINC/ModelArray\") library(ModelArray)"},{"path":"https://pennlinc.github.io/ModelArray/articles/installations.html","id":"optional-other-potential-packages-only-needed-for-downloading-demo-data-in-vignettewalkthrough-page","dir":"Articles","previous_headings":"","what":"(Optional) Other potential packages only needed for downloading demo data in vignette(\"walkthrough\") page","title":"Installation","text":"several potential packages needed downloading demo data vignette(\"walkthrough\") page. may skip step use demo data. wget tar don’t , please install first. macOS system, may try brew install . Linux Ubuntu system, may try sudo apt-get install .","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/voxel-wise_data.html","id":"conversion-of-voxel-wise-data-format","dir":"Articles","previous_headings":"","what":"Conversion of voxel-wise data format","title":"Application to voxel-wise data","text":"converting voxel-wise data NIfTI HDF5 file format ModelArray requires, still use ConFixel software, different converter tailored voxel-wise data, ConVoxel. provided walkthrough use .","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/voxel-wise_data.html","id":"applying-modelarray-to-voxel-wise-data","dir":"Articles","previous_headings":"","what":"Applying ModelArray to voxel-wise data","title":"Application to voxel-wise data","text":"can apply ModelArray functions, arguments, etc used fixel-wise data voxel-wise data; just aware “element” “voxel” now. addition, additional arguments specifically useful voxel-wise data, regarding subject-specific masks (.e., individual masks). Different fixel-wise data subjects usually share mask, voxel-wise data may subject-specific masks, different subjects may different brain coverage even template space. Therefore, voxels (e.g., edge brain) data sufficient number subjects, statistic results might reliable. ’s better exclude voxels analysis. ConVoxel, voxels within subject-specific mask (within larger, group-level mask), values set NaN. Thus ModelArray can know number subjects valid values voxel within group mask. set minimal number subjects required voxel, can use two arguments ModelArray.lm() ModelArray.gam(): num.subj.lthr.abs: lower threshold, absolute number subjects; e.g., 10 num.subj.lthr.rel: lower threshold, proportion total number subjects, value 0-1; e.g., 0.2 (.e., 20% subjects) Suppose voxel valid values N subjects, N: N > num.subj.lthr.abs, N > num.subj.lthr.rel * Ntotal Ntotal total number subjects, quantified number rows argument phenotypes. N satisfied criteria, statistical analysis voxel performed normal; otherwise, voxel skipped statistical outputs set NaN. details two arguments, please check reference pages ModelArray.lm() ModelArray.gam(). Finally, choose save number observations used (.e., specifying nobs var.model ModelArray.lm() ModelArray.gam()), conversion using ConVoxel, ’ll see image called *_model.nobs*. subject-specific masks provided different across subjects, image ’ll probably see heterogeneity number observations used brain, fewer observations used edge brain.","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Example walkthrough","text":"example walkthrough, use example fixel-wise data demonstrate steps using ModelArray companion python package, ConFixel. Analysis voxel-wise data follows similar steps, several differences execution; details regarding application voxel-wise data, please refer vignette(\"voxel-wise_data\") page. also provide hints voxel-wise data throughout current walkthrough. following vignette(\"installations\") page, perform statistical analysis fixel-wise data, successfully installed ModelArray, ConFixel, MRtrix. expect ConFixel installed conda environment called modelarray. first prepare data convert format ModelArray requires (Step 1), ’ll use ModelArray perform statistical analysis (Step 2). Finally convert results original file format view (Step 3).","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-1--prepare-your-data","dir":"Articles","previous_headings":"","what":"Step 1. Prepare your data","title":"Example walkthrough","text":"first create folder called “myProject” Desktop. terminal console: linux machine, ’ll see printed full path folder /home//Desktop/myProject , provide demo fixel-wise data. demo data includes 100 subjects aged 8-22 years Philadelphia Neurodevelopmental Cohort (PNC) Satterthwaite et al., 2014. data generated following fixel-based analysis Raffelt et al., 2017 ready fixel-wise statistical analysis. can get data running following: Hint voxel-wise data Step 1: Data preparation conversion steps different voxel-wise data. Please refer .","code":"$ cd ~/Desktop $ mkdir myProject $ cd myProject $ pwd # print the full path of this folder $ wget -cO - https://osf.io/tce9d/download > download.tar.gz $ tar -xzf download.tar.gz $ rm download.tar.gz"},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-1-1--overview-of-the-data-organization","dir":"Articles","previous_headings":"Step 1. Prepare your data","what":"Step 1.1. Overview of the data organization","title":"Example walkthrough","text":"data organized following way: demo data, fixel-wise metric FDC. can see , folder FDC, besides subject-level fixel-wise data template space (e.g. sub-010b693.mif), also files index.mif directions.mif. two files provide important information fixel locations - can learn definitions .","code":"~/Desktop/myProject ├── cohort_FDC_n100.csv ├── FDC │ ├── directions.mifs │ ├── index.mif │ ├── sub-010b693.mif │ ├── sub-0133f31.mif │ ├── sub-063fd82.mif │ ├── ... └── ..."},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-1-2--prepare-a-csv-file-of-cohort-phenotypes","dir":"Articles","previous_headings":"Step 1. Prepare your data","what":"Step 1.2. Prepare a CSV file of cohort phenotypes","title":"Example walkthrough","text":"addition fixel-wise data, also need CSV file cohort phenotypes. file used ConFixel ModelArray. ’s example: cohort_FDC_n100.csv: table CSV file includes columns: Required: scalar_name, tells us metric analyzed, source_file, tells us mif file used subject Covariates: covariates want include statistical model. dti64MeanRelRMS measure -scanner motion, want control .","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-1-3--convert-data-into-an-hdf5-file-using-confixel","dir":"Articles","previous_headings":"Step 1. Prepare your data","what":"Step 1.3. Convert data into an HDF5 file using ConFixel","title":"Example walkthrough","text":"One reasons ModelArray memory efficient takes advantages Hierarchical Data Format 5 (HDF5) file format. extension file format .h5. short, HDF5 file stores large datasets hierarchically. Let’s use ConFixel convert list mif files HDF5 file. terminal console: mentioned , take /home//Desktop/myProject main folder; won’t need repeat paths ’ve used --relative-root flag. running confixel, see moving progress bar. finishes, looks like : Now got converted HDF5 file demo_FDC_n100.h5 folder ~/Desktop/myProject.","code":"$ conda activate modelarray $ confixel \\ --index-file FDC/index.mif \\ --directions-file FDC/directions.mif \\ --cohort-file cohort_FDC_n100.csv \\ --relative-root /home//Desktop/myProject \\ --output-hdf5 demo_FDC_n100.h5 # remember to use your specific path in --relative-root; # we recommend it's a full path too! Extracting .mif data... 100%|█████████████████████████████████████████| 100/100 [00:03<00:00, 30.33it/s]"},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-2--use-modelarray-to-perform-statistical-analysis","dir":"Articles","previous_headings":"","what":"Step 2. Use ModelArray to perform statistical analysis","title":"Example walkthrough","text":"next step use HDF5 file CSV file prepared perform statistical analysis R. installed RStudio (recommend), can simply launch RStudio. commands Step 2 section run R. Hint voxel-wise data Step 2: can follow steps . Note “element” voxel now, instead fixel. Make sure replace scalar name, covariates, file paths etc . addition, voxel-wise data may subject-specific masks, can also tailor lower threshold number subjects applying ModelArray.lm() ModelArray.gam(). See vignette(\"voxel-wise_data\") page .","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-2-1--load-modelarray-package-in-r","dir":"Articles","previous_headings":"Step 2. Use ModelArray to perform statistical analysis","what":"Step 2.1. Load ModelArray package in R","title":"Example walkthrough","text":"’ve installed ModelArray, ’s load library:","code":"library(ModelArray)"},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-2-2--create-a-modelarray-class-object","dir":"Articles","previous_headings":"Step 2. Use ModelArray to perform statistical analysis","what":"Step 2.2. Create a ModelArray-class object","title":"Example walkthrough","text":"create ModelArray-class object represents HDF5 file fixel-wise data, need HDF5 filename scalar’s name: ’ll see: shows 100 source FDC files modelarray created. may take look scalar matrix looks like using scalars(): ’ll see: Rows fixels (n = 602229), column names source filenames (n = 100). value specific fixel’s FDC mif file.","code":"# filename of example fixel-wise data (.h5 file): h5_path <- \"~/Desktop/myProject/demo_FDC_n100.h5\" # create a ModelArray-class object: modelarray <- ModelArray(h5_path, scalar_types = c(\"FDC\")) # let's check what's in it: modelarray ModelArray located at ~/Desktop/myProject/demo_FDC_n100.h5 Source files: 100 Scalars: FDC Analyses: # scalar FDC data: scalars(modelarray)[[\"FDC\"]] <602229 x 100> matrix of class DelayedMatrix and type \"double\": FDC/sub-6fee490.mif FDC/sub-647f86c.mif ... FDC/sub-fb15b55.mif FDC/sub-063fd82.mif [1,] 0.24264026 0.15679701 . 0.00454893 0.16528498 [2,] 0.04573315 0.30895054 . 0.25159708 0.33469012 [3,] 0.18638037 0.26985332 . 0.26864439 0.26453218 [4,] 0.13169773 0.36824343 . 0.19793315 0.27003124 [5,] 0.22650713 0.16020685 . 0.10235775 0.41848758 ... . . . . . [602225,] 0.1058939 0.1262244 . 0.2559175 0.2618564 [602226,] 0.2273949 0.8616257 . 0.4713631 0.5220432 [602227,] 0.1899130 1.2083211 . 0.2561999 0.1202894 [602228,] 0.0000000 1.3483975 . 0.0000000 0.0000000 [602229,] 0.1275258 0.5184639 . 0.2065310 0.1833882"},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-2-3--load-cohort-phenotypes-csv-file","dir":"Articles","previous_headings":"Step 2. Use ModelArray to perform statistical analysis","what":"Step 2.3. Load cohort phenotypes CSV file","title":"Example walkthrough","text":"load accompanying CSV file: CSV file already provides sufficient covariates ready analysis , don’t need extra work .","code":"# filename of example fixel-wise data (.h5 file): csv_path <- \"~/Desktop/myProject/cohort_FDC_n100.csv\" # load the CSV file: phenotypes <- read.csv(csv_path)"},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-2-4--perform-statistical-analysis","dir":"Articles","previous_headings":"Step 2. Use ModelArray to perform statistical analysis","what":"Step 2.4. Perform statistical analysis","title":"Example walkthrough","text":"modelarray data frame phenotypes set , can now perform statistical analysis. present, ModelArray supports linear models well generalized additive models (GAM) without penalized splines, particularly useful studying nonlinear effects lifespan data. Let’s start linear model ModelArray.lm(). first need formula defining model. mainly want test fixel FDC changes age adolescence, assuming ’s linear relationship. also add sex -scanner motion quantification dti64MeanRelRMS covariates. Intercept automatically added. first try first 100 fixels running fixels: ’ll see: first printed several options lm set, worked model fitting. Let’s check first 6 rows results, .e. results first 6 fixels: ’ll see: can see, fixel, default, ModelArray.lm() returns: estimation Intercept coefficients slopes terms t-statistics p-value p-value FDR correction adjusted R-squared p-value p-value FDR correction may request comprehensive statistics argument full.outputs=TRUE. Now let’s try ModelArray.gam(). example commands . Compared linear model, GAMs flexibly model linear nonlinear effects using smooth functions; penalty can also applied avoid -fitting. use s(Age) indicate fit spline smooth function. k=4 argument sets upper limit degrees freedom smooth function. Restricted maximum likelihood (REML) used fitting. addition default FDR correction, can also request Bonferroni correction. still first try first 100 fixels: ’ll see: GAM results first 6 fixels: ’ll see: can see, fixel, ModelArray.gam() returns: Several statistics smooth term s(Age), including F-statistics p-values (FDR Bonferroni correction); Several statistics parametric terms Intercept, sex, motion dti64MeanRelRMS, including estimation coefficient (slope), t-statistics, p-values (FDR Bonferroni correction); One statistic model: dev.expl, proportion null deviance explained model. options, please view pages ModelArray.lm() ModelArray.gam().","code":"# formula: formula.lm <- FDC ~ Age + sex + dti64MeanRelRMS # run linear model fitting with ModelArray.lm() on the first 100 fixels: mylm.try <- ModelArray.lm(formula.lm, modelarray, phenotypes, \"FDC\", element.subset = 1:100) subset: default weights: default na.action: default method: default model: default x: default y: default qr: default singular.ok: default contrasts: default offset: default Fitting element-wise linear models for FDC initiating.... looping across elements.... |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=06s head(mylm.try) # formula: formula.gam <- FDC ~ s(Age, k=4) + sex + dti64MeanRelRMS # run GAM fitting with ModelArray.gam() on the first 100 fixels: mygam.try <- ModelArray.gam(formula.gam, modelarray, phenotypes, \"FDC\", element.subset = 1:100, correct.p.value.smoothTerms = c(\"fdr\", \"bonferroni\"), correct.p.value.parametricTerms = c(\"fdr\", \"bonferroni\"), method=\"REML\") The formula requested: FDC ~ s(Age, k = 4) + sex + dti64MeanRelRMS s(Age): k = 4; fx = FALSE (default); bs = tp (default) method = REML (default: GCV.Cp) Fitting element-wise GAMs for FDC initiating.... looping across elements.... |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=14s head(mygam.try)"},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-2-5--a-full-run-and-saving-the-results","dir":"Articles","previous_headings":"Step 2. Use ModelArray to perform statistical analysis","what":"Step 2.5. A full run and saving the results","title":"Example walkthrough","text":"Previous examples ran small subset fixels. Now ’ll formally run across fixels save results. running fixels take substantial amount time, run linear model. Notice command uses default value element.subset=NULL fixels analyzed. Also notice , speed , ’re requesting 4 CPU cores run parallel. may adjust number based many CPU cores machine. Linux machine Intel(R) Xeon(R) 10th Gen CPU @ 2.81GHz using 4 CPU cores, takes around 2.5 hours finish. now save results data frame original h5 file: Notice analysis name specified argument analysis_name used ConFixel next step converting results back fixel mif file format. ’ll also used prefix mif files saved. can even check saved results h5 file (optional): ’ll see: results_lm shown .","code":"# run linear model fitting with ModelArray.lm() on the all fixels: mylm <- ModelArray.lm(formula.lm, modelarray, phenotypes, \"FDC\", n_cores = 4) writeResults(h5_path, df.output = mylm, analysis_name = \"results_lm\") # create a new ModelArray-class object: modelarray_new <- ModelArray(filepath = h5_path, scalar_types = \"FDC\", analysis_names = c(\"results_lm\")) modelarray_new ModelArray located at ~/Desktop/myProject/demo_FDC_n100.h5 Source files: 100 Scalars: FDC Analyses: results_lm"},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-3--check-out-the-result-images","dir":"Articles","previous_headings":"","what":"Step 3. Check out the result images","title":"Example walkthrough","text":"Hint voxel-wise data Step 3: Data conversion result viewing different voxel-wise data. Please refer .","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-3-1--convert-the-statistical-results-into-mif-file-format-using-confixel","dir":"Articles","previous_headings":"Step 3. Check out the result images","what":"Step 3.1. Convert the statistical results into mif file format using ConFixel","title":"Example walkthrough","text":"now use ConFixel convert results list mif files: ’s done, main folder myProject, new folder called results_lm, converted result mif files new folder: , 1m.p.value.* means ’s 1 - p-value image.","code":"$ conda activate modelarray # activate the conda environment we created $ fixelstats_write \\ --index-file FDC/index.mif \\ --directions-file FDC/directions.mif \\ --cohort-file cohort_FDC_n100.csv \\ --relative-root /home//Desktop/myProject \\ --analysis-name results_lm \\ --input-hdf5 demo_FDC_n100.h5 \\ --output-dir results_lm # remember to use your specific path in --relative-root; # we recommend it's a full path too! results_lm/ ├── directions.mif ├── index.mif ├── results_lm_Age.1m.p.value.fdr.mif ├── results_lm_Age.1m.p.value.mif ├── results_lm_Age.estimate.mif ├── results_lm_Age.p.value.fdr.mif ├── results_lm_Age.p.value.mif ├── results_lm_Age.statistic.mif ├── results_lm_dti64MeanRelRMS.1m.p.value.fdr.mif ├── results_lm_dti64MeanRelRMS.1m.p.value.mif ├── results_lm_dti64MeanRelRMS.estimate.mif ├── results_lm_dti64MeanRelRMS.p.value.fdr.mif ├── results_lm_dti64MeanRelRMS.p.value.mif ├── results_lm_dti64MeanRelRMS.statistic.mif ├── results_lm_element_id.mif ├── results_lm_Intercept.1m.p.value.fdr.mif ├── ... ├── results_lm_model.1m.p.value.fdr.mif ├── results_lm_model.1m.p.value.mif ├── results_lm_model.adj.r.squared.mif ├── results_lm_model.p.value.fdr.mif ├── results_lm_model.p.value.mif ├── results_lm_sex.1m.p.value.fdr.mif ├── ... 0 directories, 32 files"},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-3-2--view-the-results-in-mrtrixs-mrview","dir":"Articles","previous_headings":"Step 3. Check out the result images","what":"Step 3.2. View the results in MRtrix’s MRView","title":"Example walkthrough","text":"can launch MRView terminal mrview: Click File -> Open, select index.mif. click Tools -> Fixel plot, ’ll see side panel “Fixel plot”. Within side panel, click button “Open fixel image” (see , highlighted red): Open fixel image , select index.mif file . ’ll see colored directions.mif. Now can choose image display. Click filename next “colour ”, select results_lm_Age.estimate.mif; click button next “threshold ”, select results_lm_model.p.value.fdr.mif, check/tick option upper limit, enter “0.005”. may change view clicking “View” upper panel. example view: example view","code":"# Suppose you're in myProject folder: $ cd results_lm # switch to results folder $ mrview"},{"path":"https://pennlinc.github.io/ModelArray/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Chenying Zhao. Author. Tinashe Tapera. Author. Matthew Cieslak. Author, maintainer. Theodore Satterthwaite. Author.","code":""},{"path":"https://pennlinc.github.io/ModelArray/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Zhao C, Tapera T, Cieslak M, Satterthwaite T (2023). ModelArray: R package statistical analysis fixel-wise data beyond. R package version 0.1.4.9000, https://pennlinc.github.io/ModelArray.","code":"@Manual{, title = {ModelArray: An R package for statistical analysis of fixel-wise data and beyond}, author = {Chenying Zhao and Tinashe Tapera and Matthew Cieslak and Theodore Satterthwaite}, year = {2023}, note = {R package version 0.1.4.9000}, url = {https://pennlinc.github.io/ModelArray}, }"},{"path":"https://pennlinc.github.io/ModelArray/index.html","id":"modelarray","dir":"","previous_headings":"","what":"An R package for statistical analysis of fixel-wise data and beyond","title":"An R package for statistical analysis of fixel-wise data and beyond","text":"ModelArray R package statistical analysis fixel-wise data beyond. features include: Easy use: set statistical analysis just several lines code; present, ModelArray supports linear models well generalized additive models (GAMs) without penalized splines, particularly useful studying nonlinear effects lifespan data. ModelArray also extensible diverse models available R; Scalable large-scale datasets; Compatible fixel-wise data, voxel-wise data, greyordinate-wise data. Please cite NeuroImage paper use ModelArray: Zhao, C., Tapera, T. M., Bagautdinova, J., Bourque, J., Covitz, S., Gur, R. E., Gur, R. C., Larsen, B., Mehta, K., Meisler, S. L., Murtha, K., Muschelli, J., Roalf, D. R., Sydnor, V. J., Valcarcel, . M., Shinohara, R. T., Cieslak, M. & Satterthwaite, T. D. (2023). ModelArray: R package statistical analysis fixel-wise data. NeuroImage, 271, 120037. https://doi.org/10.1016/j.neuroimage.2023.120037","code":""},{"path":"https://pennlinc.github.io/ModelArray/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"An R package for statistical analysis of fixel-wise data and beyond","text":"Overview ModelArray packaged companion software ConFixel converting fixel-wise data, voxel-wise data greyordinate-wise data expected file format ModelArray uses. Specifically, ConFixel Python-based command-line interface software, converts original image format (.mif fixel-wise data, NIfTI voxel-wise data, CIFTI-2 greyordinate-wise data) HDF5 file format (.h5) used ModelArray.","code":""},{"path":"https://pennlinc.github.io/ModelArray/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"An R package for statistical analysis of fixel-wise data and beyond","text":"Please refer webpage Installation full guidance installation ModelArray companion python package ConFixel. important steps installing ModelArray : Make sure necessary libraries HDF5 - see section Install ModelArray GitHub - see section Additionally, also provide container image includes ModelArray ConFixel. container image, need user install ModelArray, ConFixel, dependent R Python packages. Please see webpage use container image.","code":""},{"path":"https://pennlinc.github.io/ModelArray/index.html","id":"how-to-use","dir":"","previous_headings":"","what":"How to use","title":"An R package for statistical analysis of fixel-wise data and beyond","text":"Load ModelArray package R via: provide walkthrough example fixel-wise data. additional notes application voxel-wise data, please refer . documentation ModelArray functions, can: Either go webpage; R console, type: help(). example: help(ModelArray.lm) Full documentation ModelArray can found . Source code ModelArray can found .","code":"library(ModelArray)"},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.gam.html","id":null,"dir":"Reference","previous_headings":"","what":"Run GAM for element-wise data — ModelArray.gam","title":"Run GAM for element-wise data — ModelArray.gam","text":"`ModelArray.gam` fits gam model elements requested, returns tibble data.frame requested model statistics.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.gam.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run GAM for element-wise data — ModelArray.gam","text":"","code":"ModelArray.gam( formula, data, phenotypes, scalar, element.subset = NULL, full.outputs = FALSE, var.smoothTerms = c(\"statistic\", \"p.value\"), var.parametricTerms = c(\"estimate\", \"statistic\", \"p.value\"), var.model = c(\"dev.expl\"), changed.rsq.term.index = NULL, correct.p.value.smoothTerms = c(\"fdr\"), correct.p.value.parametricTerms = c(\"fdr\"), num.subj.lthr.abs = 10, num.subj.lthr.rel = 0.2, verbose = TRUE, pbar = TRUE, n_cores = 1, ... )"},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.gam.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run GAM for element-wise data — ModelArray.gam","text":"formula Formula (passed `mgcv::gam()`) data ModelArray class phenotypes data.frame cohort columns independent variables covariates added model. contains column called \"source_file\", column match data. scalar character. name element-wise scalar analysed element.subset list positive integers (min = 1, max = number elements). subset elements want run. Default `NULL`, .e. requesting elements `data`. full.outputs TRUE FALSE, Whether return full set outputs. FALSE, return requested arguments var.* correct.p.value.*; TRUE, arguments var.* ignored, return possible statistics var.* options requested arguments correct.p.value.*. var.smoothTerms list characters. list variables save smooth terms (got `broom::tidy(parametric = FALSE)`). Example smooth term: age formula \"outcome ~ s(age)\". See \"Details\" section . var.parametricTerms list characters. list variables save parametric terms (got `broom::tidy(parametric = TRUE)`). Example parametric term: sex formula \"outcome ~ s(age) + sex\". See \"Details\" section . var.model list characters. list variables save model (got `broom::glance()` `summary()`). See \"Details\" section . changed.rsq.term.index list (one several) positive integers. element list means -th term formula's right hand side term interest changed R-squared without . delta adjusted R-squared partial R-squared calculated term requested. Usually term interest smooth term, interaction term models interactions. See \"Details\" section , especially \"WARNING\" Details section cases caution!! correct.p.value.smoothTerms list characters. perform add column p.value correction smooth term. Default: \"fdr\". See \"Details\" section . correct.p.value.parametricTerms list characters. perform add column p.value correction parametric term. Default: \"fdr\". See \"Details\" section . num.subj.lthr.abs integer, lower threshold absolute number subjects. element, number subjects finite values (defined `.finite()`, .e. NaN NA Inf) h5 file > num.subj.lthr.abs, element run normally; otherwise, element skipped statistical outputs set NaN. Default 10. num.subj.lthr.rel value 0-1, lower threshold relative number subjects. Similar num.subj.lthr.abs, proportion subjects valid value > num.subj.lthr.rel, element run normally; otherwise, element skipped statistical outputs set NaN. Default 0.2. verbose TRUE FALSE, print verbose messages pbar TRUE FALSE, print progress bar n_cores Positive integer, number CPU cores run ... Additional arguments `mgcv::gam()`","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.gam.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run GAM for element-wise data — ModelArray.gam","text":"Tibble summarized model statistics elements requested","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.gam.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Run GAM for element-wise data — ModelArray.gam","text":"may request returning specific statistical variables setting var.*, can get setting full.outputs=TRUE. Note statistics covered full.outputs var.* ones broom::tidy(), broom::glance(), summary() , include delta adjusted R-squared partial R-squared corrected p-values. However FDR-corrected p-values (\"fdr\") generated default. List acceptable statistic names var.*: var.smoothTerms: c(\"edf\",\"ref.df\",\"statistic\",\"p.value\"); interpretation please see tidy.gam `parametric=FALSE`. var.parametricTerms: c(\"estimate\", \"std.error\",\"statistic\",\"p.value\"); interpretation please see tidy.gam `parametric=TRUE`. var.model: c(\"adj.r.squared\",\"dev.expl\", \"sp.criterion\", \"scale\", \"df\", \"logLik\",\"AIC\", \"BIC\", \"deviance\", \"df.residual\", \"nobs\"); \"adj.r.squared\" r.sq summary.gam; \"sp.criterion\" sp.criterion summary.gam; interpretation please see glance.gam summary.gam. Regarding formula: far kinds formula tested: formula smooth term, without interactions. Examples like y ~ s(x) + orderedFactor; y ~ s(x) + s(z) formula interaction, limited one interaction term, formats : Formula #1: y ~ orderedFactor + s(x) + s(x, =orderedFactor) + other_covariate, orderedFactor discrete variables generated `ordered`. interaction term displayed \"s_x_BYorderedFactor\" column name returned data.frame. may use function `generator_gamFormula_factorXsmooth()` generate one. Formula #2: y ~ ti(x) + ti(z) + ti(x,z) + other_covariate, x z continuous variables. interaction term displayed \"ti_x_z\" column name returned data.frame. may use function `generator_gamFormula_continuousInteraction()` generate one. may interested important term model. provide two ways quantification (see ). require running reduced model without term interest, thus take longer time run. can make request via argument changed.rsq.term.index, get quantifications. Delta adjusted R-squared (delta.adj.rsq) defined difference adjusted R-squared full model (full formula formula) reduced model (formula without term interest). Notice adjusted R-squared includes penalty model complexity. Partial R-squared (partial.rsq) defined : (sse.reduced.model - sse.full.model) / sse.reduced.model, sse error sum squares (, residual sum squares). quantifies amount variance response variable explained reduced model (model without term interest), can explained term interest full model. ___!!! WARNING !!!___: want request changed.rsq.term.index term missing values, feeding phenotypes ModelArray.gam(), must exclude observations (.e., rows phenotypes) missing values term interest phenotypes. term like request changed.rsq.term.index, term missing values. Without exclusion, full reduced models include different number subjects, causing inaccuracy calculation delta.adj.rsq partial.rsq. notes changed.rsq.term.index: requesting changed.rsq.term.index, fx set TRUE, degree freedom fixed. formula interactions, formula formats tested, values interaction term valid. delta.adj.rsq partial.rsq main effect (s(x) Formula #1) may \"functionally\" metrics, definitions changed reduced formula without main effect interaction term. p-value corrections (arguments correct.p.value.*), supported methods include methods `p.adjust.methods` except \"none\". can request one method. FDR-corrected p-values (\"fdr\") calculated default. Turn setting \"none\". Please notice different `ModelArray.lm`, p.value GAM model, \"correct.p.value.model\" GAM model. Arguments num.subj.lthr.abs num.subj.lthr.rel mainly input data subject-specific masks, .e. currently volume data. fixel-wise data, may ignore arguments.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.html","id":null,"dir":"Reference","previous_headings":"","what":"An S4 class to represent element-wise scalar data and statistics. — ModelArray","title":"An S4 class to represent element-wise scalar data and statistics. — ModelArray","text":"S4 class represent element-wise scalar data statistics. Load element-wise data .h5 file ModelArray object","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"An S4 class to represent element-wise scalar data and statistics. — ModelArray","text":"","code":"ModelArray(filepath, scalar_types = c(\"FD\"), analysis_names = c(\"myAnalysis\")) ModelArray(filepath, scalar_types = c(\"FD\"), analysis_names = c(\"myAnalysis\"))"},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"An S4 class to represent element-wise scalar data and statistics. — ModelArray","text":"filepath file scalar_types expected scalars analysis_names subfolder names results .h5 file","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"An S4 class to represent element-wise scalar data and statistics. — ModelArray","text":"ModelArray object","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"An S4 class to represent element-wise scalar data and statistics. — ModelArray","text":": Tips debugging: run error: \"Error h(simpleError(msg, call)) : error evaluating argument 'seed' selecting method function 'DelayedArray': HDF5. Symbol table. open object.\" please check give correct \"scalar_types\" - check via rhdf5::h5ls(filename_for_h5)","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"An S4 class to represent element-wise scalar data and statistics. — ModelArray","text":"sources list source filenames scalars list element-wise scalar matrix results list statistical result matrix path Path h5 file disk","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit linear model for element-wise data — ModelArray.lm","title":"Fit linear model for element-wise data — ModelArray.lm","text":"`ModelArray.lm` fits linear model (`stats::lm()`) elements requested, returns tibble dataframe requested model statistics.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.lm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit linear model for element-wise data — ModelArray.lm","text":"","code":"ModelArray.lm( formula, data, phenotypes, scalar, element.subset = NULL, full.outputs = FALSE, var.terms = c(\"estimate\", \"statistic\", \"p.value\"), var.model = c(\"adj.r.squared\", \"p.value\"), correct.p.value.terms = c(\"fdr\"), correct.p.value.model = c(\"fdr\"), num.subj.lthr.abs = 10, num.subj.lthr.rel = 0.2, verbose = TRUE, pbar = TRUE, n_cores = 1, ... )"},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit linear model for element-wise data — ModelArray.lm","text":"formula Formula (passed `stats::lm()`) data ModelArray class phenotypes data.frame cohort columns independent variables covariates added model. contains column called \"source_file\", column match data. scalar character. name element-wise scalar analysed element.subset list positive integers (min = 1, max = number elements). subset elements want run. Default `NULL`, .e. requesting elements `data`. full.outputs TRUE FALSE, Whether return full set outputs. FALSE, return requested arguments var.* correct.p.value.*; TRUE, arguments var.* ignored, return possible statistics var.* options requested arguments correct.p.value.*. var.terms list characters. list variables save terms (got `broom::tidy()`). See \"Details\" section . var.model list characters. list variables save model (got `broom::glance()`). See \"Details\" section . correct.p.value.terms list characters. perform add column p.value correction term. Default: \"fdr\". See \"Details\" section . correct.p.value.model list characters. perform add column p.value correction model. Default: \"fdr\". See \"Details\" section . num.subj.lthr.abs integer, lower threshold absolute number subjects. element, number subjects finite values (defined `.finite()`, .e. NaN NA Inf) h5 file > num.subj.lthr.abs, element run normally; otherwise, element skipped statistical outputs set NaN. Default 10. num.subj.lthr.rel value 0-1, lower threshold relative number subjects. Similar num.subj.lthr.abs, proportion subjects valid value > num.subj.lthr.rel, element run normally; otherwise, element skipped statistical outputs set NaN. Default 0.2. verbose TRUE FALSE, print verbose message pbar TRUE FALSE, print progress bar n_cores Positive integer, number CPU cores run ... Additional arguments `stats::lm()`","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.lm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit linear model for element-wise data — ModelArray.lm","text":"Tibble summarized model statistics elements requested","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.lm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fit linear model for element-wise data — ModelArray.lm","text":"may request returning specific statistical variables setting var.*, can get setting full.outputs=TRUE. Note statistics covered full.outputs var.* ones broom::tidy() broom::glance() , include corrected p-values. However FDR-corrected p-values (\"fdr\") generated default. List acceptable statistic names var.*: var.terms: c(\"estimate\",\"std.error\",\"statistic\",\"p.value\"); interpretation please see tidy.lm. var.model: c(\"r.squared\", \"adj.r.squared\", \"sigma\", \"statistic\", \"p.value\", \"df\", \"logLik\", \"AIC\", \"BIC\", \"deviance\", \"df.residual\", \"nobs\"); interpretation please see glance.lm. p-value corrections (arguments correct.p.value.*), supported methods include methods `p.adjust.methods` except \"none\". Can one method. FDR-corrected p-values (\"fdr\") calculated default. Turn setting \"none\". Arguments num.subj.lthr.abs num.subj.lthr.rel mainly input data subject-specific masks, .e. currently volume data. fixel-wise data, may ignore arguments.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/analyseOneElement.gam.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit GAM for one element — analyseOneElement.gam","title":"Fit GAM for one element — analyseOneElement.gam","text":"`analyseOneElement.gam` fits GAM model one element data, returns requested model statistics.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/analyseOneElement.gam.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit GAM for one element — analyseOneElement.gam","text":"","code":"analyseOneElement.gam( i_element, formula, modelarray, phenotypes, scalar, var.smoothTerms, var.parametricTerms, var.model, num.subj.lthr, num.stat.output = NULL, flag_initiate = FALSE, flag_sse = FALSE, ... )"},{"path":"https://pennlinc.github.io/ModelArray/reference/analyseOneElement.gam.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit GAM for one element — analyseOneElement.gam","text":"i_element integer, i_th element, starting 1. initiating (flag_initiate = TRUE), use i_element=1 formula formula (passed `mgcv::gam()`) modelarray ModelArray class phenotypes data.frame cohort columns independent variables covariates added model scalar character. name element-wise scalar analysed var.smoothTerms list variables save smooth terms (got broom::tidy(parametric = FALSE)). Example smooth term: age formula \"outcome ~ s(age)\". var.parametricTerms list variables save parametric terms (got broom::tidy(parametric = TRUE)). Example parametric term: sex formula \"outcome ~ s(age) + sex\". var.model list variables save model (got broom::glance() summary()). num.subj.lthr minimal number subjects valid value input h5 file, .e. number subjects finite values (defined `.finite()`, .e. NaN NA Inf) h5 file > num.subj.lthr, element run normally; otherwise, element skipped statistical outputs set NaN. num.stat.output number output stat metrics (generating NaN stat # subjects meet criteria). includes column `element_id`. required flag_initiate = TRUE. flag_initiate TRUE FALSE, Whether initiate new analysis. TRUE, return column names etc used initiating data.frame; FALSE, return list requested statistic values. flag_sse TRUE FALSE, Whether calculate SSE (sum squared error) model (`model.sse`). SSE needed calculating partial R-squared. ... Additional arguments `mgcv::gam()`","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/analyseOneElement.gam.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit GAM for one element — analyseOneElement.gam","text":"flag_initiate==TRUE, returns column names, list term names final results, attr.name sp.criterion; flag_initiate==FALSE, return list requested statistic values element.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/analyseOneElement.gam.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fit GAM for one element — analyseOneElement.gam","text":"`ModelArray.gam` iteratively calls function get statistics requested elements.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/analyseOneElement.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit linear model for one element. — analyseOneElement.lm","title":"Fit linear model for one element. — analyseOneElement.lm","text":"`analyseOneElement.lm` fits linear model one element data, returns requested model statistics.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/analyseOneElement.lm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit linear model for one element. — analyseOneElement.lm","text":"","code":"analyseOneElement.lm( i_element, formula, modelarray, phenotypes, scalar, var.terms, var.model, num.subj.lthr, num.stat.output = NULL, flag_initiate = FALSE, ... )"},{"path":"https://pennlinc.github.io/ModelArray/reference/analyseOneElement.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit linear model for one element. — analyseOneElement.lm","text":"i_element integer, i_th element, starting 1. initiating (flag_initiate = TRUE), use i_element=1 formula Formula (passed `stats::lm()`) modelarray ModelArray class phenotypes data.frame cohort columns independent variables covariates added model. scalar character. name element-wise scalar analysed var.terms list characters. list variables save terms (got `broom::tidy()`). var.model list characters. list variables save model (got `broom::glance()`). num.subj.lthr minimal number subjects valid value input h5 file, .e. number subjects finite values (defined `.finite()`, .e. NaN NA Inf) h5 file > num.subj.lthr, element run normally; otherwise, element skipped statistical outputs set NaN. num.stat.output number output stat metrics (generating NaN stat # subjects meet criteria). includes column `element_id`. required flag_initiate = TRUE. flag_initiate TRUE FALSE, Whether initiate new analysis. TRUE, return column names etc used initiating data.frame; FALSE, return list requested statistic values. ... Additional arguments `stats::lm()`","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/analyseOneElement.lm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit linear model for one element. — analyseOneElement.lm","text":"flag_initiate==TRUE, returns column names, list term names final results; flag_initiate==FALSE, return list requested statistic values element.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/analyseOneElement.lm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fit linear model for one element. — analyseOneElement.lm","text":"`ModelArray.lm` iteratively calls function get statistics requested elements.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/check_validity_correctPValue.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if the list of p-value correction methods are valid for a specific type of term/model. \nCan be used for any statistical model. As long as the p.value to be correct is named as ","title":"Check if the list of p-value correction methods are valid for a specific type of term/model. \nCan be used for any statistical model. As long as the p.value to be correct is named as ","text":"Check list p-value correction methods valid specific type term/model. Can used statistical model. long p.value correct named \"p.value\".","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/check_validity_correctPValue.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if the list of p-value correction methods are valid for a specific type of term/model. \nCan be used for any statistical model. As long as the p.value to be correct is named as ","text":"","code":"check_validity_correctPValue( correct.list, name.correct.list, var.list, name.var.list )"},{"path":"https://pennlinc.github.io/ModelArray/reference/check_validity_correctPValue.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if the list of p-value correction methods are valid for a specific type of term/model. \nCan be used for any statistical model. As long as the p.value to be correct is named as ","text":"correct.list list correction methods type term/model name.correct.list name list correction methods type term/model var.list list statistics saved type term/model name.var.list name list statistics saved type term/model","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/checker_gam_formula.html","id":null,"dir":"Reference","previous_headings":"","what":"A checker for formula in gam for ModelArray.gam()\nTODO: finish the description — checker_gam_formula","title":"A checker for formula in gam for ModelArray.gam()\nTODO: finish the description — checker_gam_formula","text":"checker formula gam ModelArray.gam() TODO: finish description","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/checker_gam_formula.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A checker for formula in gam for ModelArray.gam()\nTODO: finish the description — checker_gam_formula","text":"","code":"checker_gam_formula(formula, gam.formula.breakdown, onemodel = NULL)"},{"path":"https://pennlinc.github.io/ModelArray/reference/checker_gam_s.html","id":null,"dir":"Reference","previous_headings":"","what":"Print out important arguments in smooth terms s() in mgcv::gam() formula\nref: https://www.rdocumentation.org/packages/mgcv/versions/1.8-38/topics/s\nTODO: finish the description — checker_gam_s","title":"Print out important arguments in smooth terms s() in mgcv::gam() formula\nref: https://www.rdocumentation.org/packages/mgcv/versions/1.8-38/topics/s\nTODO: finish the description — checker_gam_s","text":"Print important arguments smooth terms s() mgcv::gam() formula ref: https://www.rdocumentation.org/packages/mgcv/versions/1.8-38/topics/s TODO: finish description","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/checker_gam_s.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print out important arguments in smooth terms s() in mgcv::gam() formula\nref: https://www.rdocumentation.org/packages/mgcv/versions/1.8-38/topics/s\nTODO: finish the description — checker_gam_s","text":"","code":"checker_gam_s(ofInterest)"},{"path":"https://pennlinc.github.io/ModelArray/reference/checker_gam_s.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print out important arguments in smooth terms s() in mgcv::gam() formula\nref: https://www.rdocumentation.org/packages/mgcv/versions/1.8-38/topics/s\nTODO: finish the description — checker_gam_s","text":"ofInterest got via: gam.formula.breakdown <- mgcv::interpret.gam(formula); ofInterest <- gam.formula.breakdown$smooth.spec[[]]","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/checker_gam_t.html","id":null,"dir":"Reference","previous_headings":"","what":"Print out important arguments in smooth term te() or ti() or t2() in mgcv::gam() formula\nWhy a separate function is needed for t(), cannot using s(): in ofInterest, ","title":"Print out important arguments in smooth term te() or ti() or t2() in mgcv::gam() formula\nWhy a separate function is needed for t(), cannot using s(): in ofInterest, ","text":"Print important arguments smooth term te() ti() t2() mgcv::gam() formula separate function needed t(), using s(): ofInterest, \"fx\" \"fx\" t(), \"fixed\" s() - different. ref: https://www.rdocumentation.org/packages/mgcv/versions/1.8-38/topics/te /t2() TODO: finish description","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/checker_gam_t.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print out important arguments in smooth term te() or ti() or t2() in mgcv::gam() formula\nWhy a separate function is needed for t(), cannot using s(): in ofInterest, ","text":"","code":"checker_gam_t(FUN, ofInterest)"},{"path":"https://pennlinc.github.io/ModelArray/reference/checker_gam_t.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print out important arguments in smooth term te() or ti() or t2() in mgcv::gam() formula\nWhy a separate function is needed for t(), cannot using s(): in ofInterest, ","text":"FUN mgcv::te(), ti() t2() ofInterest got via: gam.formula.breakdown <- mgcv::interpret.gam(formula); ofInterest <- gam.formula.breakdown$smooth.spec[[]]","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/generator_gamFormula_continuousInteraction.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate GAM formula with continuous*continuous interaction — generator_gamFormula_continuousInteraction","title":"Generate GAM formula with continuous*continuous interaction — generator_gamFormula_continuousInteraction","text":"function generate formula following format: y ~ ti(x) + ti(z) + ti(x,z), y response.var, x cont1.var, z cont2.var. formula generated modified, e.g. adding covariates.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/generator_gamFormula_continuousInteraction.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate GAM formula with continuous*continuous interaction — generator_gamFormula_continuousInteraction","text":"","code":"generator_gamFormula_continuousInteraction( response.var, cont1.var, cont2.var, fx = TRUE, k = NULL )"},{"path":"https://pennlinc.github.io/ModelArray/reference/generator_gamFormula_continuousInteraction.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate GAM formula with continuous*continuous interaction — generator_gamFormula_continuousInteraction","text":"response.var character class, variable name response cont1.var character class, name first continuous variable cont2.var character class, name second continuous variable fx TRUE FALSE, used smooth term s(). Recommend TRUE. k integer, used smooth term including interaction term. NULL (entry), use default value mgcv::s()","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/generator_gamFormula_continuousInteraction.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate GAM formula with continuous*continuous interaction — generator_gamFormula_continuousInteraction","text":"formula generated","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/generator_gamFormula_factorXsmooth.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate GAM formula with factor-smooth interaction — generator_gamFormula_factorXsmooth","title":"Generate GAM formula with factor-smooth interaction — generator_gamFormula_factorXsmooth","text":"function generate formula following format: y ~ orderedFactor + s(x) + s(x, =orderedFactor), y response.var, x smooth.var, orderedFactor factor.var - see factor.var . formula generated modified, e.g. adding covariates.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/generator_gamFormula_factorXsmooth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate GAM formula with factor-smooth interaction — generator_gamFormula_factorXsmooth","text":"","code":"generator_gamFormula_factorXsmooth( response.var, factor.var, smooth.var, phenotypes, reference.group = NULL, prefix.ordered.factor = \"o\", fx = TRUE, k = NULL )"},{"path":"https://pennlinc.github.io/ModelArray/reference/generator_gamFormula_factorXsmooth.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate GAM formula with factor-smooth interaction — generator_gamFormula_factorXsmooth","text":"response.var character class, variable name response factor.var character class, variable name factor. ordered factor. , generate new column `phenotypes`, requires `reference.group`. smooth.var character class, variable name smooth term main effect phenotypes data.frame class, cohort matrix columns independent variables (including factor.var smooth.var) added model reference.group character class, reference group ordered factor `factor.var`; required `factor.var` `phenotypes` ordered factor. prefix.ordered.factor character class, prefix ordered factor; required `factor.var` `phenotypes` ordered factor. fx TRUE FALSE, used smooth term s(). Recommend TRUE. k integer, used smooth term including interaction term. NULL (entry), use default value mgcv::s()","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/generator_gamFormula_factorXsmooth.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate GAM formula with factor-smooth interaction — generator_gamFormula_factorXsmooth","text":"list, including: 1) formula generated; 2) data.frame phenotypes - updated argument factor.var ordered factor","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/numElementsTotal.html","id":null,"dir":"Reference","previous_headings":"","what":"Number of elements in ModelArray — numElementsTotal","title":"Number of elements in ModelArray — numElementsTotal","text":"Returns number elements ModelArray, specific scalar","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/numElementsTotal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Number of elements in ModelArray — numElementsTotal","text":"","code":"numElementsTotal(modelarray, scalar_name = \"FD\")"},{"path":"https://pennlinc.github.io/ModelArray/reference/numElementsTotal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Number of elements in ModelArray — numElementsTotal","text":"modelarray ModelArray class scalar_name character, scalar name (one existing scalar modelarray)","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/numElementsTotal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Number of elements in ModelArray — numElementsTotal","text":"number elements ModelArray, specific scalar","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/pipe.html","id":null,"dir":"Reference","previous_headings":"","what":"Pipe operator — %>%","title":"Pipe operator — %>%","text":"See magrittr::%>% details.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/pipe.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pipe operator — %>%","text":"","code":"lhs %>% rhs"},{"path":"https://pennlinc.github.io/ModelArray/reference/pipe.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pipe operator — %>%","text":"lhs value magrittr placeholder. rhs function call using magrittr semantics.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/pipe.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pipe operator — %>%","text":"result calling `rhs(lhs)`.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/printAdditionalArgu.html","id":null,"dir":"Reference","previous_headings":"","what":"print the additional arguments settings — printAdditionalArgu","title":"print the additional arguments settings — printAdditionalArgu","text":"print additional arguments settings","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/printAdditionalArgu.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"print the additional arguments settings — printAdditionalArgu","text":"","code":"printAdditionalArgu( FUN, argu_name, dots, message_default = NULL, message_usr_input = NULL )"},{"path":"https://pennlinc.github.io/ModelArray/reference/printAdditionalArgu.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"print the additional arguments settings — printAdditionalArgu","text":"FUN function, e.g. mgcv::gam, without \"()\" argu_name argument name function message_default message default message_usr_input message describing user's input dots: list additional arguments","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/results-ModelArray-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Statistical results of an ModelArray object — results,ModelArray-method","title":"Statistical results of an ModelArray object — results,ModelArray-method","text":"Statistical results ModelArray object","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/results-ModelArray-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Statistical results of an ModelArray object — results,ModelArray-method","text":"","code":"# S4 method for ModelArray results(x, ...)"},{"path":"https://pennlinc.github.io/ModelArray/reference/results-ModelArray-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Statistical results of an ModelArray object — results,ModelArray-method","text":"x ModelArray object ... Additional arguments. Currently accept analysis name (character)","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/results-ModelArray-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Statistical results of an ModelArray object — results,ModelArray-method","text":"Statistical results ModelArray object","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/scalars-ModelArray-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Element-wise scalar data of an ModelArray object — scalars,ModelArray-method","title":"Element-wise scalar data of an ModelArray object — scalars,ModelArray-method","text":"Element-wise scalar data ModelArray object","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/scalars-ModelArray-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Element-wise scalar data of an ModelArray object — scalars,ModelArray-method","text":"","code":"# S4 method for ModelArray scalars(x, ...)"},{"path":"https://pennlinc.github.io/ModelArray/reference/scalars-ModelArray-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Element-wise scalar data of an ModelArray object — scalars,ModelArray-method","text":"x ModelArray object ... Additional arguments. Currently accept scalar name (character)","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/scalars-ModelArray-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Element-wise scalar data of an ModelArray object — scalars,ModelArray-method","text":"matrix element-wise scalar data: elements (row) source files (column).","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/show-ModelArray-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Show ModelArray object — show,ModelArray-method","title":"Show ModelArray object — show,ModelArray-method","text":"Print basic information ModelArray object, including number source files, scalar names, analysis names.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/show-ModelArray-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Show ModelArray object — show,ModelArray-method","text":"","code":"# S4 method for ModelArray show(object)"},{"path":"https://pennlinc.github.io/ModelArray/reference/show-ModelArray-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Show ModelArray object — show,ModelArray-method","text":"object ModelArray object","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/sources-ModelArray-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Source filenames of an ModelArray object — sources,ModelArray-method","title":"Source filenames of an ModelArray object — sources,ModelArray-method","text":"Source filenames ModelArray object","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/sources-ModelArray-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Source filenames of an ModelArray object — sources,ModelArray-method","text":"","code":"# S4 method for ModelArray sources(x)"},{"path":"https://pennlinc.github.io/ModelArray/reference/sources-ModelArray-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Source filenames of an ModelArray object — sources,ModelArray-method","text":"x ModelArray object","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/sources-ModelArray-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Source filenames of an ModelArray object — sources,ModelArray-method","text":"list source filenames","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/subjects-ModelArray-method.html","id":null,"dir":"Reference","previous_headings":"","what":"subjects of ModelArray — subjects,ModelArray-method","title":"subjects of ModelArray — subjects,ModelArray-method","text":"subjects ModelArray","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/subjects-ModelArray-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"subjects of ModelArray — subjects,ModelArray-method","text":"","code":"# S4 method for ModelArray subjects(x)"},{"path":"https://pennlinc.github.io/ModelArray/reference/writeResults.html","id":null,"dir":"Reference","previous_headings":"","what":"Write outputs from element-wise statistical analysis to the HDF5 file. — writeResults","title":"Write outputs from element-wise statistical analysis to the HDF5 file. — writeResults","text":"Create group named `analysis_name` HDF5 file, write statistical results data.frame (.e. one analysis) .","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/writeResults.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write outputs from element-wise statistical analysis to the HDF5 file. — writeResults","text":"","code":"writeResults( fn.output, df.output, analysis_name = \"myAnalysis\", overwrite = TRUE )"},{"path":"https://pennlinc.github.io/ModelArray/reference/writeResults.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write outputs from element-wise statistical analysis to the HDF5 file. — writeResults","text":"fn.output character, HDF5 (.h5) filename output df.output data.frame object element-wise statistical results, returned `ModelArray.lm()` etc analysis_name character, name results overwrite group analysis_name exists HDF5 file, whether overwrite (TRUE) (FALSE)","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/writeResults.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Write outputs from element-wise statistical analysis to the HDF5 file. — writeResults","text":"debug tip: \"Error H5File.open(filename, mode, file_create_pl, file_access_pl)\", check message 'file directory'. Try absolute .h5 filename.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/writeResults.old.html","id":null,"dir":"Reference","previous_headings":"","what":"Write outputs from fixel-based analysis out to the h5 file. Write one results (i.e. for one analysis) at a time. This is ","title":"Write outputs from fixel-based analysis out to the h5 file. Write one results (i.e. for one analysis) at a time. This is ","text":"Write outputs fixel-based analysis h5 file. Write one results (.e. one analysis) time. \".old\": writing results multiple rows one fixel","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/writeResults.old.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write outputs from fixel-based analysis out to the h5 file. Write one results (i.e. for one analysis) at a time. This is ","text":"","code":"writeResults.old( modelarray, data, analysis_name = \"myAnalysis\", flag_overwrite = TRUE )"},{"path":"https://pennlinc.github.io/ModelArray/reference/writeResults.old.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write outputs from fixel-based analysis out to the h5 file. Write one results (i.e. for one analysis) at a time. This is ","text":"modelarray ModelArray object data data.frame object model results fixel analysis_name subfolder name results, holding analysis results flag_overwrite analysis_name exists, whether overwrite ","code":""}] +[{"path":"https://pennlinc.github.io/ModelArray/articles/basic_r_intro.html","id":"r-syntax","dir":"Articles","previous_headings":"","what":"R syntax","title":"An intro to R","text":"Dot “.” valid variable name function (e.g. variable element.subset, function ModelArray.lm()) Syntax formula: example formula: can see even though define variable “FD”,“age” “sex”, ’s valid formula. Left hand side “~” dependent variable (y, response), right hand side includes independent variables / covariates.","code":"formula <- FD ~ age + sex"},{"path":"https://pennlinc.github.io/ModelArray/articles/basic_r_intro.html","id":"prepare-the-phenotypes-data-frame-manipulations","dir":"Articles","previous_headings":"","what":"Prepare the phenotypes data.frame: manipulations","title":"An intro to R","text":"may want manipulate data.frame phenotypes passing ModelArray.lm() etc functions model fitting. Examples like de-mean rescale covariates. R package dplyr useful easy use manipulation.","code":"# install is first via: install.packages(\"dplyr\") library(dplyr) # load into memory #> #> Attaching package: 'dplyr' #> The following objects are masked from 'package:stats': #> #> filter, lag #> The following objects are masked from 'package:base': #> #> intersect, setdiff, setequal, union"},{"path":"https://pennlinc.github.io/ModelArray/articles/container.html","id":"preface","dir":"Articles","previous_headings":"","what":"Preface","title":"Getting started with containers","text":"Target audience: user wants use container run ModelArray /ConFixel covered page? use container image ModelArray + ConFixel. covered page? Step step details run ModelArray ConFixel. full walkthrough use software, please refer vignette(\"walkthrough\"). highly suggest reviewing page ’re new ModelArray.","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/container.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Getting started with containers","text":"Besides running ModelArray ConFixel local computer, users also option run High Performance Computing (HPC) clusters. using HPC clusters, users may full privilege install dependent packages. Therefore, provide option download software container image includes ModelArray + ConFixel. container image publicly available Docker Hub. Although HPC clusters usually support docker commands, container image can run singularity commands, usually available HPC clusters (see details).","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/container.html","id":"using-singularity-to-run-on-hpc-clusters","dir":"Articles","previous_headings":"","what":"Using singularity to run on HPC clusters","title":"Getting started with containers","text":"Prerequisite: Singularity installed cluster. , please contact cluster’s administrator.","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/container.html","id":"pull-the-container-from-docker-hub","dir":"Articles","previous_headings":"Using singularity to run on HPC clusters","what":"Pull the container from Docker Hub","title":"Getting started with containers","text":"first pull container Docker Hub using singularity pull command follows: replace actual tag, e.g., 0.1.2, latest. see singularity image (.sif) current directory: modelarray_confixel_.sif pulling, let’s make sure can singularity run image: now inside R environment capability load ModelArray R package RStudio: library(ModelArray). also way interactively use container image run R, please make sure mount necessary directories -B - see explanations.","code":"singularity pull docker://pennlinc/modelarray_confixel: singularity run --cleanenv \\ modelarray_confixel_.sif \\ R"},{"path":"https://pennlinc.github.io/ModelArray/articles/container.html","id":"how-to-run-the-container","dir":"Articles","previous_headings":"Using singularity to run on HPC clusters","what":"How to run the container?","title":"Getting started with containers","text":": -B /directory///data allows mount data directory singularity can read write data inside . data exists inside current working directory, might -B $PWD; /path//singularity/image/modelarray_confixel_.sif full path singularity image (.sif) pulled; ModelArray ConFixel included container. run ConFixel, simply replace ConFixel commands (e.g., confixel). run ModelArray, may first save R commands R script, replace Rscript /path///Rscript. Make sure Rscript mounted (-B), , e.g., ’s directory /directory///data, please : -B /directory///data,/directory//Rscript. See mount multiple directories. might submit command singularity run job running cluster compute node.","code":"singularity run --cleanenv -B /directory/of/your/data \\ /path/to/singularity/image/modelarray_confixel_.sif \\ "},{"path":"https://pennlinc.github.io/ModelArray/articles/container.html","id":"more-information","dir":"Articles","previous_headings":"","what":"More information?","title":"Getting started with containers","text":"provided detailed example walkthrough ModelArray ConFixel : vignette(\"walkthrough\"). Please refer page tutorial use ModelArray ConFixel.","code":""},{"path":[]},{"path":"https://pennlinc.github.io/ModelArray/articles/debugging.html","id":"this-analysis-myanalysis-does-not-exist","dir":"Articles","previous_headings":"ModelArray()","what":"“This analysis: myAnalysis does not exist…”","title":"Debugging","text":"calling ModelArray(h5_path, scalar_types = c(\"FDC\")): One possible reason happens , HDF5 file want “load” results, specify result name, makes ModelArray() function uses default name myAnalysis result name . issue happens frequently want test R script results saved HDF5 file; next time run script, result name specified ModelArray() causes error. One way avoid make backup original HDF5 file, want use input, make copy running ModelArray().","code":"Error in ModelArray(h5_path, scalar_types = c(\"FDC\")) : This analysis: myAnalysis does not exist... Execution halted"},{"path":"https://pennlinc.github.io/ModelArray/articles/doc_for_developer.html","id":"overview","dir":"Articles","previous_headings":"","what":"Overview","title":"Developer documentation","text":"ModelArray R package supports data Hierarchical Data Format 5 (HDF5) file format. utilizes DelayedArray HDF5Array R packages, statistical analysis can performed without loading original data HDF5 file memory. makes ModelArray efficient memory usage. details, please see section “ModelArray Construction” . Methods showing accessing ModelArray object basic. Please see section “Show accessors methods ModelArray class” . key function ModelArray package perform statistical analysis. details, please see section “Model fitting” . describe save statistical results HDF5 file disk. Furthermore, describe unit tests needed quality assurance. Finally describe building Docker image.","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/doc_for_developer.html","id":"modelarray-construction","dir":"Articles","previous_headings":"","what":"ModelArray Construction","title":"Developer documentation","text":"first define class called ModelArray using setClass(). ModelArray object (.e. instance ModelArray class) several slots: sources: source filenames (e.g., list .mif files fixel-wise data) scalars: scalar matrix (matrices) results: statistical result matrices () path: path h5 file disk key feature ModelArray object memory efficient. entire dataset HDF5 (.h5) file loaded memory; minimal data loaded. achieve , first need ModelArraySeed(), utilizes HDF5Array::HDF5ArraySeed(), acting pointer .hdf5 file disk. make arrays ModelArray object look like “real” arrays, e.g. common array operations indexing transposing can applied, utilize package DelayedArray wraps data -disk HDF5 file DelayedArray object. Finally ModelArray class defined integrating slots together. done ModelArray() function. functions setups can found script R/ModelArray_Constructor.R","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/doc_for_developer.html","id":"show-and-accessors-methods-of-modelarray-class","dir":"Articles","previous_headings":"","what":"Show and accessors methods of ModelArray class","title":"Developer documentation","text":"easily show access ModelArray object, adopt S4 Object Oriented Programming (OOP) model. End users R actually using S4 methods frequently. example, showing (summarized) content object, users simply enter name R console press “enter”. hood, uses generic show() method. showing ModelArray object, adopt way. show() already generic function, need setMethod() setup. S4 OOP model, users can easily access data need. current accessor functions accessing different slots ModelArray class’s: sources(): source filenames (e.g., list .mif files fixel-wise data) scalars(): scalar matrix (matrices) results(): statistical result matrix matrices () use setMethod() define methods. Unlike show(), accessors generic yet, additional step setGeneric(). show accessors setups can found script R/ModelArray_S4Methods.R.","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/doc_for_developer.html","id":"model-fitting","dir":"Articles","previous_headings":"","what":"Model fitting","title":"Developer documentation","text":"Functions ModelArray.lm() ModelArray.gam() model fitting. hood, functions iteratively call analyseOneElement.lm() analyseOneElement.gam() fitting one element, respectively. also facilitates parallel computing across elements requested. Besides existing functions linear models (ModelArray.lm()) GAMs (ModelArray.gam()), new functions diverse statistical models can added following structure . general structure model fitting functions ModelArray.() ModelArray : sanity checks arguments Print important methods model fitting, method mgcv::gam() GAMs First, initialize: run analyseOneElement.() get column names statistics output statistics; usually using element middle (instead first last element) avoid many NaNs data; Fit model element; Get necessary statistics via broom::tidy(), broom::glance(), /summary(). Flatten results one row data.frame element; add element ids; remove column names (’s list numeric now) save bit memory Return result element Concatenate results requested elements matrix elements statistics, add column names; now get final result data.frame p-value correction method, apply add values result data.frame Return result data.frame ModelArray.gam(), additional step one round iteration: Iteratively call analyseOneElement.() providing reduced formula Get necessary statistics Compute delta adjusted R-squared partial R-squared; add previously got data.frame Therefore, might two rounds iterations model fitting ModelArray.gam(), depending number terms user requested changed.rsq.term.index. Functions mentioned section can found scripts R/analyse.R R/ModelArray_Constructor.R.","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/doc_for_developer.html","id":"saving-statistical-results-to--hdf5-file-on-disk","dir":"Articles","previous_headings":"","what":"Saving statistical results to .hdf5 file on disk","title":"Developer documentation","text":"getting data.frame statistical results, users save original HDF5 file disk. function writeResults() located script R/ModelArray_Constructor.R","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/doc_for_developer.html","id":"writing-tests-for-circleci","dir":"Articles","previous_headings":"","what":"Writing tests for CircleCI","title":"Developer documentation","text":"use Continuous Integration (CI) testing ensure stability quality assurance ModelArray. Therefore, modify source code ModelArray, important make sure add appropriate tests new modified functionality. test files located folder tests/testthat. commit pushed GitHub, CircleCI (CI testing platform) triggered build software run unit tests. tests serve goals : Run functions different scenarios (different requests) expect error. ensure new features added, run without error; ** scenarios, special data needed. example, testing NAs input data (volume data) Expect output data.frame contain column specific name, check dimensions output data.frame. ensure expected columns show . importantly, check values expected: statistical results calculated ModelArray fitting loop = calculated standard R. Developers can run tests locally see unit tests test file (tests/testthat folder) can run without errors: click “Run Test” button RStudio run test file. Check anything failed. details write unit tests + test , please check Testing chapters book “R Packages” written Hadley Wickham, Jennifer Bryan","code":"rm(list=ls()) devtools::load_all()"},{"path":"https://pennlinc.github.io/ModelArray/articles/doc_for_developer.html","id":"building-the-docker-image-for-modelarray-confixel","dir":"Articles","previous_headings":"","what":"Building the Docker image for ModelArray + ConFixel","title":"Developer documentation","text":"Dockerfile Docker image can found root folder GitHub repository ModelArray. CircleCI automatically build Docker image push Docker Hub GitHub commit merge main branch, version tagged. See .circleci/config.yml file details setups.","code":""},{"path":[]},{"path":"https://pennlinc.github.io/ModelArray/articles/faq.html","id":"what-kind-of-fixel-wise-data-should-i-use","dir":"Articles","previous_headings":"Prepare your data for ModelArray","what":"What kind of fixel-wise data should I use?","title":"FAQ","text":"using ModelArray, stage got fixel-wise data every participant template space MRtrix following fixel-based analysis. use paper Dhollander et al., 2021 Fig.3. fixel-based analysis pipeline example, expect done step “Connectivity-based fixel smoothing”. use participant-level fixel-wise data template space step fixel-wise statistical analysis ModelArray. expect file format mif.","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/faq.html","id":"how-should-i-organize-the-data","dir":"Articles","previous_headings":"Prepare your data for ModelArray","what":"How should I organize the data?","title":"FAQ","text":"example data organization shown demo data (see vignette(\"walkthrough\")) recommend. example fixel-wise dataset, metric FDC. also metrics FC, may also folder FC CSV file cohort_FC_n100.csv myProject folder.","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/faq.html","id":"what-are-the-requirements-of-the-csv-file","dir":"Articles","previous_headings":"Prepare your data for ModelArray","what":"What are the requirements of the CSV file?","title":"FAQ","text":"expect CSV file least contains two columns - see example vignette(\"walkthrough\"), required columns highlighted bold italics: scalar_name, tells ModelArray metric analyzed source_file, tells ModelArray mif file used subject columns covariates may want include statistical model. order columns can changed.","code":""},{"path":[]},{"path":"https://pennlinc.github.io/ModelArray/articles/faq.html","id":"how-many-cpu-cores-does-my-computer-have","dir":"Articles","previous_headings":"When using ModelArray.*() for statistical analysis","what":"How many CPU cores does my computer have?","title":"FAQ","text":"may check : parallel::detectCores()","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/installations.html","id":"set-up-a-conda-environment","dir":"Articles","previous_headings":"","what":"Set up a conda environment","title":"Installation","text":"first create conda environment modelarray installing companion software ConFixel etc. ’ll install python version 3.9:","code":"foo@bar:~$ conda create --name modelarray python=3.9 foo@bar:~$ conda activate modelarray"},{"path":"https://pennlinc.github.io/ModelArray/articles/installations.html","id":"install-mrtrix-only-required-for-fixel-wise-data","dir":"Articles","previous_headings":"","what":"Install MRtrix (Only required for fixel-wise data)","title":"Installation","text":"converting fixel-wise data’s format (.mif), ConFixel uses function mrconvert MRtrix, please make sure MRtrix installed. can either installed via conda conda environment just created, compiled source. See MRtrix’s webpage . Type mrview terminal check whether MRtrix installation successful. input data voxel-wise data, can skip step.","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/installations.html","id":"install-hdf5-libraries-in-the-system","dir":"Articles","previous_headings":"","what":"Install HDF5 libraries in the system","title":"Installation","text":"ModelArray works Hierarchical Data Format 5 (HDF5) file format, need make sure necessary libraries HDF5 installed system.","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/installations.html","id":"on-a-linux-ubuntu-system","dir":"Articles","previous_headings":"Install HDF5 libraries in the system","what":"On a Linux Ubuntu system","title":"Installation","text":"’re Linux Ubuntu system: First, please check libhdf5-dev installed system: got one line outputs, congrats, libhdf5-dev installed. Otherwise, please install via:","code":"foo@bar:~$ ldconfig -p | grep libhdf5* foo@bar:~$ sudo apt-get update -y foo@bar:~$ sudo apt-get install -y libhdf5-dev"},{"path":"https://pennlinc.github.io/ModelArray/articles/installations.html","id":"on-a-macos-system","dir":"Articles","previous_headings":"Install HDF5 libraries in the system","what":"On a macOS system","title":"Installation","text":"Use Homebrew install: details may refer webpage ","code":"foo@bar:~$ brew install hdf5"},{"path":"https://pennlinc.github.io/ModelArray/articles/installations.html","id":"install-confixel-python-package-from-github","dir":"Articles","previous_headings":"","what":"Install ConFixel python package from GitHub","title":"Installation","text":"ConFixel provides file format conversion fixel-wise data (.mif) voxel-wise data (NIfTI). Follow commands install GitHub:","code":"# We first activate the conda environment we just created: foo@bar:~$ conda activate modelarray # Then install ConFixel: foo@bar:~$ cd ~/myProject foo@bar:myProject$ git clone https://github.com/PennLINC/ConFixel.git foo@bar:myProject$ cd ConFixel foo@bar:myProject$ pip install . # You may remove the original source code if you are an end user instead of a developer: foo@bar:myProject$ cd .. foo@bar:myProject$ rm -r ConFixel"},{"path":"https://pennlinc.github.io/ModelArray/articles/installations.html","id":"install-r","dir":"Articles","previous_headings":"","what":"Install R","title":"Installation","text":"ModelArray requires R >=4.1.2, currently tests ModelArray R 4.1.2. already installed , can skip step. don’t, may download CRAN.","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/installations.html","id":"optional-install-rstudio","dir":"Articles","previous_headings":"","what":"(Optional) Install RStudio","title":"Installation","text":"RStudio provides good IDE using R. However ’s optional install RStudio. haven’t got one want install , may download .","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/installations.html","id":"install-modelarray-r-package-from-github","dir":"Articles","previous_headings":"","what":"Install ModelArray R package from GitHub","title":"Installation","text":"ModelArray R package’s source code available GitHub. install R: Now, ModelArray ready use:","code":"# First, load library \"devtools\": library(devtools) # if you got error, it means you don't have devtools installed, please install it by: install.packages(\"devtools\") # Then, install ModelArray: devtools::install_github(\"PennLINC/ModelArray\") library(ModelArray)"},{"path":"https://pennlinc.github.io/ModelArray/articles/installations.html","id":"optional-other-potential-packages-only-needed-for-downloading-demo-data-in-vignettewalkthrough-page","dir":"Articles","previous_headings":"","what":"(Optional) Other potential packages only needed for downloading demo data in vignette(\"walkthrough\") page","title":"Installation","text":"several potential packages needed downloading demo data vignette(\"walkthrough\") page. may skip step use demo data. wget tar don’t , please install first. macOS system, may try brew install . Linux Ubuntu system, may try sudo apt-get install .","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/voxel-wise_data.html","id":"conversion-of-voxel-wise-data-format","dir":"Articles","previous_headings":"","what":"Conversion of voxel-wise data format","title":"Application to voxel-wise data","text":"converting voxel-wise data NIfTI HDF5 file format ModelArray requires, still use ConFixel software, different converter tailored voxel-wise data, ConVoxel. provided walkthrough use .","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/voxel-wise_data.html","id":"applying-modelarray-to-voxel-wise-data","dir":"Articles","previous_headings":"","what":"Applying ModelArray to voxel-wise data","title":"Application to voxel-wise data","text":"can apply ModelArray functions, arguments, etc used fixel-wise data voxel-wise data; just aware “element” “voxel” now. addition, additional arguments specifically useful voxel-wise data, regarding subject-specific masks (.e., individual masks). Different fixel-wise data subjects usually share mask, voxel-wise data may subject-specific masks, different subjects may different brain coverage even template space. Therefore, voxels (e.g., edge brain) data sufficient number subjects, statistic results might reliable. ’s better exclude voxels analysis. ConVoxel, voxels within subject-specific mask (within larger, group-level mask), values set NaN. Thus ModelArray can know number subjects valid values voxel within group mask. set minimal number subjects required voxel, can use two arguments ModelArray.lm() ModelArray.gam(): num.subj.lthr.abs: lower threshold, absolute number subjects; e.g., 10 num.subj.lthr.rel: lower threshold, proportion total number subjects, value 0-1; e.g., 0.2 (.e., 20% subjects) Suppose voxel valid values N subjects, N: N > num.subj.lthr.abs, N > num.subj.lthr.rel * Ntotal Ntotal total number subjects, quantified number rows argument phenotypes. N satisfied criteria, statistical analysis voxel performed normal; otherwise, voxel skipped statistical outputs set NaN. details two arguments, please check reference pages ModelArray.lm() ModelArray.gam(). Finally, choose save number observations used (.e., specifying nobs var.model ModelArray.lm() ModelArray.gam()), conversion using ConVoxel, ’ll see image called *_model.nobs*. subject-specific masks provided different across subjects, image ’ll probably see heterogeneity number observations used brain, fewer observations used edge brain.","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Example walkthrough","text":"example walkthrough, use example fixel-wise data demonstrate steps using ModelArray companion python package, ConFixel. Analysis voxel-wise data follows similar steps, several differences execution; details regarding application voxel-wise data, please refer vignette(\"voxel-wise_data\") page. also provide hints voxel-wise data throughout current walkthrough. following vignette(\"installations\") page, perform statistical analysis fixel-wise data, successfully installed ModelArray, ConFixel, MRtrix. expect ConFixel installed conda environment called modelarray. first prepare data convert format ModelArray requires (Step 1), ’ll use ModelArray perform statistical analysis (Step 2). Finally convert results original file format view (Step 3).","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-1--prepare-your-data","dir":"Articles","previous_headings":"","what":"Step 1. Prepare your data","title":"Example walkthrough","text":"first create folder called “myProject” Desktop. terminal console: linux machine, ’ll see printed full path folder /home//Desktop/myProject , provide demo fixel-wise data. demo data includes 100 subjects aged 8-22 years Philadelphia Neurodevelopmental Cohort (PNC) Satterthwaite et al., 2014. data generated following fixel-based analysis Raffelt et al., 2017 ready fixel-wise statistical analysis. can get data running following: Hint voxel-wise data Step 1: Data preparation conversion steps different voxel-wise data. Please refer .","code":"$ cd ~/Desktop $ mkdir myProject $ cd myProject $ pwd # print the full path of this folder $ wget -cO - https://osf.io/tce9d/download > download.tar.gz $ tar -xzf download.tar.gz $ rm download.tar.gz"},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-1-1--overview-of-the-data-organization","dir":"Articles","previous_headings":"Step 1. Prepare your data","what":"Step 1.1. Overview of the data organization","title":"Example walkthrough","text":"data organized following way: demo data, fixel-wise metric FDC. can see , folder FDC, besides subject-level fixel-wise data template space (e.g. sub-010b693.mif), also files index.mif directions.mif. two files provide important information fixel locations - can learn definitions .","code":"~/Desktop/myProject ├── cohort_FDC_n100.csv ├── FDC │ ├── directions.mifs │ ├── index.mif │ ├── sub-010b693.mif │ ├── sub-0133f31.mif │ ├── sub-063fd82.mif │ ├── ... └── ..."},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-1-2--prepare-a-csv-file-of-cohort-phenotypes","dir":"Articles","previous_headings":"Step 1. Prepare your data","what":"Step 1.2. Prepare a CSV file of cohort phenotypes","title":"Example walkthrough","text":"addition fixel-wise data, also need CSV file cohort phenotypes. file used ConFixel ModelArray. ’s example: cohort_FDC_n100.csv: table CSV file includes columns: Required: scalar_name, tells us metric analyzed, source_file, tells us mif file used subject Covariates: covariates want include statistical model. dti64MeanRelRMS measure -scanner motion, want control .","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-1-3--convert-data-into-an-hdf5-file-using-confixel","dir":"Articles","previous_headings":"Step 1. Prepare your data","what":"Step 1.3. Convert data into an HDF5 file using ConFixel","title":"Example walkthrough","text":"One reasons ModelArray memory efficient takes advantages Hierarchical Data Format 5 (HDF5) file format. extension file format .h5. short, HDF5 file stores large datasets hierarchically. Let’s use ConFixel convert list mif files HDF5 file. terminal console: mentioned , take /home//Desktop/myProject main folder; won’t need repeat paths ’ve used --relative-root flag. running confixel, see moving progress bar. finishes, looks like : Now got converted HDF5 file demo_FDC_n100.h5 folder ~/Desktop/myProject.","code":"$ conda activate modelarray $ confixel \\ --index-file FDC/index.mif \\ --directions-file FDC/directions.mif \\ --cohort-file cohort_FDC_n100.csv \\ --relative-root /home//Desktop/myProject \\ --output-hdf5 demo_FDC_n100.h5 # remember to use your specific path in --relative-root; # we recommend it's a full path too! Extracting .mif data... 100%|█████████████████████████████████████████| 100/100 [00:03<00:00, 30.33it/s]"},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-2--use-modelarray-to-perform-statistical-analysis","dir":"Articles","previous_headings":"","what":"Step 2. Use ModelArray to perform statistical analysis","title":"Example walkthrough","text":"next step use HDF5 file CSV file prepared perform statistical analysis R. installed RStudio (recommend), can simply launch RStudio. commands Step 2 section run R. Hint voxel-wise data Step 2: can follow steps . Note “element” voxel now, instead fixel. Make sure replace scalar name, covariates, file paths etc . addition, voxel-wise data may subject-specific masks, can also tailor lower threshold number subjects applying ModelArray.lm() ModelArray.gam(). See vignette(\"voxel-wise_data\") page .","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-2-1--load-modelarray-package-in-r","dir":"Articles","previous_headings":"Step 2. Use ModelArray to perform statistical analysis","what":"Step 2.1. Load ModelArray package in R","title":"Example walkthrough","text":"’ve installed ModelArray, ’s load library:","code":"library(ModelArray)"},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-2-2--create-a-modelarray-class-object","dir":"Articles","previous_headings":"Step 2. Use ModelArray to perform statistical analysis","what":"Step 2.2. Create a ModelArray-class object","title":"Example walkthrough","text":"create ModelArray-class object represents HDF5 file fixel-wise data, need HDF5 filename scalar’s name: ’ll see: shows 100 source FDC files modelarray created. may take look scalar matrix looks like using scalars(): ’ll see: Rows fixels (n = 602229), column names source filenames (n = 100). value specific fixel’s FDC mif file.","code":"# filename of example fixel-wise data (.h5 file): h5_path <- \"~/Desktop/myProject/demo_FDC_n100.h5\" # create a ModelArray-class object: modelarray <- ModelArray(h5_path, scalar_types = c(\"FDC\")) # let's check what's in it: modelarray ModelArray located at ~/Desktop/myProject/demo_FDC_n100.h5 Source files: 100 Scalars: FDC Analyses: # scalar FDC data: scalars(modelarray)[[\"FDC\"]] <602229 x 100> matrix of class DelayedMatrix and type \"double\": FDC/sub-6fee490.mif FDC/sub-647f86c.mif ... FDC/sub-fb15b55.mif FDC/sub-063fd82.mif [1,] 0.24264026 0.15679701 . 0.00454893 0.16528498 [2,] 0.04573315 0.30895054 . 0.25159708 0.33469012 [3,] 0.18638037 0.26985332 . 0.26864439 0.26453218 [4,] 0.13169773 0.36824343 . 0.19793315 0.27003124 [5,] 0.22650713 0.16020685 . 0.10235775 0.41848758 ... . . . . . [602225,] 0.1058939 0.1262244 . 0.2559175 0.2618564 [602226,] 0.2273949 0.8616257 . 0.4713631 0.5220432 [602227,] 0.1899130 1.2083211 . 0.2561999 0.1202894 [602228,] 0.0000000 1.3483975 . 0.0000000 0.0000000 [602229,] 0.1275258 0.5184639 . 0.2065310 0.1833882"},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-2-3--load-cohort-phenotypes-csv-file","dir":"Articles","previous_headings":"Step 2. Use ModelArray to perform statistical analysis","what":"Step 2.3. Load cohort phenotypes CSV file","title":"Example walkthrough","text":"load accompanying CSV file: CSV file already provides sufficient covariates ready analysis , don’t need extra work .","code":"# filename of example fixel-wise data (.h5 file): csv_path <- \"~/Desktop/myProject/cohort_FDC_n100.csv\" # load the CSV file: phenotypes <- read.csv(csv_path)"},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-2-4--perform-statistical-analysis","dir":"Articles","previous_headings":"Step 2. Use ModelArray to perform statistical analysis","what":"Step 2.4. Perform statistical analysis","title":"Example walkthrough","text":"modelarray data frame phenotypes set , can now perform statistical analysis. present, ModelArray supports linear models well generalized additive models (GAM) without penalized splines, particularly useful studying nonlinear effects lifespan data. Let’s start linear model ModelArray.lm(). first need formula defining model. mainly want test fixel FDC changes age adolescence, assuming ’s linear relationship. also add sex -scanner motion quantification dti64MeanRelRMS covariates. Intercept automatically added. first try first 100 fixels running fixels: ’ll see: first printed several options lm set, worked model fitting. Let’s check first 6 rows results, .e. results first 6 fixels: ’ll see: can see, fixel, default, ModelArray.lm() returns: estimation Intercept coefficients slopes terms t-statistics p-value p-value FDR correction adjusted R-squared p-value p-value FDR correction may request comprehensive statistics argument full.outputs=TRUE. Now let’s try ModelArray.gam(). example commands . Compared linear model, GAMs flexibly model linear nonlinear effects using smooth functions; penalty can also applied avoid -fitting. use s(Age) indicate fit spline smooth function. k=4 argument sets upper limit degrees freedom smooth function. Restricted maximum likelihood (REML) used fitting. addition default FDR correction, can also request Bonferroni correction. still first try first 100 fixels: ’ll see: GAM results first 6 fixels: ’ll see: can see, fixel, ModelArray.gam() returns: Several statistics smooth term s(Age), including F-statistics p-values (FDR Bonferroni correction); Several statistics parametric terms Intercept, sex, motion dti64MeanRelRMS, including estimation coefficient (slope), t-statistics, p-values (FDR Bonferroni correction); One statistic model: dev.expl, proportion null deviance explained model. options, please view pages ModelArray.lm() ModelArray.gam().","code":"# formula: formula.lm <- FDC ~ Age + sex + dti64MeanRelRMS # run linear model fitting with ModelArray.lm() on the first 100 fixels: mylm.try <- ModelArray.lm(formula.lm, modelarray, phenotypes, \"FDC\", element.subset = 1:100) subset: default weights: default na.action: default method: default model: default x: default y: default qr: default singular.ok: default contrasts: default offset: default Fitting element-wise linear models for FDC initiating.... looping across elements.... |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=06s head(mylm.try) # formula: formula.gam <- FDC ~ s(Age, k=4) + sex + dti64MeanRelRMS # run GAM fitting with ModelArray.gam() on the first 100 fixels: mygam.try <- ModelArray.gam(formula.gam, modelarray, phenotypes, \"FDC\", element.subset = 1:100, correct.p.value.smoothTerms = c(\"fdr\", \"bonferroni\"), correct.p.value.parametricTerms = c(\"fdr\", \"bonferroni\"), method=\"REML\") The formula requested: FDC ~ s(Age, k = 4) + sex + dti64MeanRelRMS s(Age): k = 4; fx = FALSE (default); bs = tp (default) method = REML (default: GCV.Cp) Fitting element-wise GAMs for FDC initiating.... looping across elements.... |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=14s head(mygam.try)"},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-2-5--a-full-run-and-saving-the-results","dir":"Articles","previous_headings":"Step 2. Use ModelArray to perform statistical analysis","what":"Step 2.5. A full run and saving the results","title":"Example walkthrough","text":"Previous examples ran small subset fixels. Now ’ll formally run across fixels save results. running fixels take substantial amount time, run linear model. Notice command uses default value element.subset=NULL fixels analyzed. Also notice , speed , ’re requesting 4 CPU cores run parallel. may adjust number based many CPU cores machine. Linux machine Intel(R) Xeon(R) 10th Gen CPU @ 2.81GHz using 4 CPU cores, takes around 2.5 hours finish. now save results data frame original h5 file: Notice analysis name specified argument analysis_name used ConFixel next step converting results back fixel mif file format. ’ll also used prefix mif files saved. can even check saved results h5 file (optional): ’ll see: results_lm shown .","code":"# run linear model fitting with ModelArray.lm() on the all fixels: mylm <- ModelArray.lm(formula.lm, modelarray, phenotypes, \"FDC\", n_cores = 4) writeResults(h5_path, df.output = mylm, analysis_name = \"results_lm\") # create a new ModelArray-class object: modelarray_new <- ModelArray(filepath = h5_path, scalar_types = \"FDC\", analysis_names = c(\"results_lm\")) modelarray_new ModelArray located at ~/Desktop/myProject/demo_FDC_n100.h5 Source files: 100 Scalars: FDC Analyses: results_lm"},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-3--check-out-the-result-images","dir":"Articles","previous_headings":"","what":"Step 3. Check out the result images","title":"Example walkthrough","text":"Hint voxel-wise data Step 3: Data conversion result viewing different voxel-wise data. Please refer .","code":""},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-3-1--convert-the-statistical-results-into-mif-file-format-using-confixel","dir":"Articles","previous_headings":"Step 3. Check out the result images","what":"Step 3.1. Convert the statistical results into mif file format using ConFixel","title":"Example walkthrough","text":"now use ConFixel convert results list mif files: ’s done, main folder myProject, new folder called results_lm, converted result mif files new folder: , 1m.p.value.* means ’s 1 - p-value image.","code":"$ conda activate modelarray # activate the conda environment we created $ fixelstats_write \\ --index-file FDC/index.mif \\ --directions-file FDC/directions.mif \\ --cohort-file cohort_FDC_n100.csv \\ --relative-root /home//Desktop/myProject \\ --analysis-name results_lm \\ --input-hdf5 demo_FDC_n100.h5 \\ --output-dir results_lm # remember to use your specific path in --relative-root; # we recommend it's a full path too! results_lm/ ├── directions.mif ├── index.mif ├── results_lm_Age.1m.p.value.fdr.mif ├── results_lm_Age.1m.p.value.mif ├── results_lm_Age.estimate.mif ├── results_lm_Age.p.value.fdr.mif ├── results_lm_Age.p.value.mif ├── results_lm_Age.statistic.mif ├── results_lm_dti64MeanRelRMS.1m.p.value.fdr.mif ├── results_lm_dti64MeanRelRMS.1m.p.value.mif ├── results_lm_dti64MeanRelRMS.estimate.mif ├── results_lm_dti64MeanRelRMS.p.value.fdr.mif ├── results_lm_dti64MeanRelRMS.p.value.mif ├── results_lm_dti64MeanRelRMS.statistic.mif ├── results_lm_element_id.mif ├── results_lm_Intercept.1m.p.value.fdr.mif ├── ... ├── results_lm_model.1m.p.value.fdr.mif ├── results_lm_model.1m.p.value.mif ├── results_lm_model.adj.r.squared.mif ├── results_lm_model.p.value.fdr.mif ├── results_lm_model.p.value.mif ├── results_lm_sex.1m.p.value.fdr.mif ├── ... 0 directories, 32 files"},{"path":"https://pennlinc.github.io/ModelArray/articles/walkthrough.html","id":"step-3-2--view-the-results-in-mrtrixs-mrview","dir":"Articles","previous_headings":"Step 3. Check out the result images","what":"Step 3.2. View the results in MRtrix’s MRView","title":"Example walkthrough","text":"can launch MRView terminal mrview: Click File -> Open, select index.mif. click Tools -> Fixel plot, ’ll see side panel “Fixel plot”. Within side panel, click button “Open fixel image” (see , highlighted red): Open fixel image , select index.mif file . ’ll see colored directions.mif. Now can choose image display. Click filename next “colour ”, select results_lm_Age.estimate.mif; click button next “threshold ”, select results_lm_model.p.value.fdr.mif, check/tick option upper limit, enter “0.005”. may change view clicking “View” upper panel. example view: example view","code":"# Suppose you're in myProject folder: $ cd results_lm # switch to results folder $ mrview"},{"path":"https://pennlinc.github.io/ModelArray/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Chenying Zhao. Author. Tinashe Tapera. Author. Matthew Cieslak. Author, maintainer. Theodore Satterthwaite. Author.","code":""},{"path":"https://pennlinc.github.io/ModelArray/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Zhao C, Tapera T, Cieslak M, Satterthwaite T (2023). ModelArray: R package statistical analysis fixel-wise data beyond. R package version 0.1.5, https://pennlinc.github.io/ModelArray.","code":"@Manual{, title = {ModelArray: An R package for statistical analysis of fixel-wise data and beyond}, author = {Chenying Zhao and Tinashe Tapera and Matthew Cieslak and Theodore Satterthwaite}, year = {2023}, note = {R package version 0.1.5}, url = {https://pennlinc.github.io/ModelArray}, }"},{"path":"https://pennlinc.github.io/ModelArray/index.html","id":"modelarray","dir":"","previous_headings":"","what":"An R package for statistical analysis of fixel-wise data and beyond","title":"An R package for statistical analysis of fixel-wise data and beyond","text":"ModelArray R package statistical analysis fixel-wise data beyond. features include: Easy use: set statistical analysis just several lines code; present, ModelArray supports linear models well generalized additive models (GAMs) without penalized splines, particularly useful studying nonlinear effects lifespan data. ModelArray also extensible diverse models available R; Scalable large-scale datasets; Compatible fixel-wise data, voxel-wise data, greyordinate-wise data. Please cite NeuroImage paper use ModelArray: Zhao, C., Tapera, T. M., Bagautdinova, J., Bourque, J., Covitz, S., Gur, R. E., Gur, R. C., Larsen, B., Mehta, K., Meisler, S. L., Murtha, K., Muschelli, J., Roalf, D. R., Sydnor, V. J., Valcarcel, . M., Shinohara, R. T., Cieslak, M. & Satterthwaite, T. D. (2023). ModelArray: R package statistical analysis fixel-wise data. NeuroImage, 271, 120037. https://doi.org/10.1016/j.neuroimage.2023.120037","code":""},{"path":"https://pennlinc.github.io/ModelArray/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"An R package for statistical analysis of fixel-wise data and beyond","text":"Overview ModelArray packaged companion software ConFixel converting fixel-wise data, voxel-wise data greyordinate-wise data expected file format ModelArray uses. Specifically, ConFixel Python-based command-line interface software, converts original image format (.mif fixel-wise data, NIfTI voxel-wise data, CIFTI-2 greyordinate-wise data) HDF5 file format (.h5) used ModelArray.","code":""},{"path":"https://pennlinc.github.io/ModelArray/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"An R package for statistical analysis of fixel-wise data and beyond","text":"Please refer webpage Installation full guidance installation ModelArray companion python package ConFixel. important steps installing ModelArray : Make sure necessary libraries HDF5 - see section Install ModelArray GitHub - see section Additionally, also provide container image includes ModelArray ConFixel. container image, need user install ModelArray, ConFixel, dependent R Python packages. Please see webpage use container image.","code":""},{"path":"https://pennlinc.github.io/ModelArray/index.html","id":"how-to-use","dir":"","previous_headings":"","what":"How to use","title":"An R package for statistical analysis of fixel-wise data and beyond","text":"Load ModelArray package R via: provide walkthrough example fixel-wise data. additional notes application voxel-wise data, please refer . documentation ModelArray functions, can: Either go webpage; R console, type: help(). example: help(ModelArray.lm) Full documentation ModelArray can found . Source code ModelArray can found .","code":"library(ModelArray)"},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.gam.html","id":null,"dir":"Reference","previous_headings":"","what":"Run GAM for element-wise data — ModelArray.gam","title":"Run GAM for element-wise data — ModelArray.gam","text":"`ModelArray.gam` fits gam model elements requested, returns tibble data.frame requested model statistics.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.gam.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run GAM for element-wise data — ModelArray.gam","text":"","code":"ModelArray.gam( formula, data, phenotypes, scalar, element.subset = NULL, full.outputs = FALSE, var.smoothTerms = c(\"statistic\", \"p.value\"), var.parametricTerms = c(\"estimate\", \"statistic\", \"p.value\"), var.model = c(\"dev.expl\"), changed.rsq.term.index = NULL, correct.p.value.smoothTerms = c(\"fdr\"), correct.p.value.parametricTerms = c(\"fdr\"), num.subj.lthr.abs = 10, num.subj.lthr.rel = 0.2, verbose = TRUE, pbar = TRUE, n_cores = 1, ... )"},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.gam.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run GAM for element-wise data — ModelArray.gam","text":"formula Formula (passed `mgcv::gam()`) data ModelArray class phenotypes data.frame cohort columns independent variables covariates added model. contains column called \"source_file\", column match data. scalar character. name element-wise scalar analysed element.subset list positive integers (min = 1, max = number elements). subset elements want run. Default `NULL`, .e. requesting elements `data`. full.outputs TRUE FALSE, Whether return full set outputs. FALSE, return requested arguments var.* correct.p.value.*; TRUE, arguments var.* ignored, return possible statistics var.* options requested arguments correct.p.value.*. var.smoothTerms list characters. list variables save smooth terms (got `broom::tidy(parametric = FALSE)`). Example smooth term: age formula \"outcome ~ s(age)\". See \"Details\" section . var.parametricTerms list characters. list variables save parametric terms (got `broom::tidy(parametric = TRUE)`). Example parametric term: sex formula \"outcome ~ s(age) + sex\". See \"Details\" section . var.model list characters. list variables save model (got `broom::glance()` `summary()`). See \"Details\" section . changed.rsq.term.index list (one several) positive integers. element list means -th term formula's right hand side term interest changed R-squared without . delta adjusted R-squared partial R-squared calculated term requested. Usually term interest smooth term, interaction term models interactions. See \"Details\" section , especially \"WARNING\" Details section cases caution!! correct.p.value.smoothTerms list characters. perform add column p.value correction smooth term. Default: \"fdr\". See \"Details\" section . correct.p.value.parametricTerms list characters. perform add column p.value correction parametric term. Default: \"fdr\". See \"Details\" section . num.subj.lthr.abs integer, lower threshold absolute number subjects. element, number subjects finite values (defined `.finite()`, .e. NaN NA Inf) h5 file > num.subj.lthr.abs, element run normally; otherwise, element skipped statistical outputs set NaN. Default 10. num.subj.lthr.rel value 0-1, lower threshold relative number subjects. Similar num.subj.lthr.abs, proportion subjects valid value > num.subj.lthr.rel, element run normally; otherwise, element skipped statistical outputs set NaN. Default 0.2. verbose TRUE FALSE, print verbose messages pbar TRUE FALSE, print progress bar n_cores Positive integer, number CPU cores run ... Additional arguments `mgcv::gam()`","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.gam.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run GAM for element-wise data — ModelArray.gam","text":"Tibble summarized model statistics elements requested","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.gam.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Run GAM for element-wise data — ModelArray.gam","text":"may request returning specific statistical variables setting var.*, can get setting full.outputs=TRUE. Note statistics covered full.outputs var.* ones broom::tidy(), broom::glance(), summary() , include delta adjusted R-squared partial R-squared corrected p-values. However FDR-corrected p-values (\"fdr\") generated default. List acceptable statistic names var.*: var.smoothTerms: c(\"edf\",\"ref.df\",\"statistic\",\"p.value\"); interpretation please see tidy.gam `parametric=FALSE`. var.parametricTerms: c(\"estimate\", \"std.error\",\"statistic\",\"p.value\"); interpretation please see tidy.gam `parametric=TRUE`. var.model: c(\"adj.r.squared\",\"dev.expl\", \"sp.criterion\", \"scale\", \"df\", \"logLik\",\"AIC\", \"BIC\", \"deviance\", \"df.residual\", \"nobs\"); \"adj.r.squared\" r.sq summary.gam; \"sp.criterion\" sp.criterion summary.gam; interpretation please see glance.gam summary.gam. Regarding formula: far kinds formula tested: formula smooth term, without interactions. Examples like y ~ s(x) + orderedFactor; y ~ s(x) + s(z) formula interaction, limited one interaction term, formats : Formula #1: y ~ orderedFactor + s(x) + s(x, =orderedFactor) + other_covariate, orderedFactor discrete variables generated `ordered`. interaction term displayed \"s_x_BYorderedFactor\" column name returned data.frame. may use function `generator_gamFormula_factorXsmooth()` generate one. Formula #2: y ~ ti(x) + ti(z) + ti(x,z) + other_covariate, x z continuous variables. interaction term displayed \"ti_x_z\" column name returned data.frame. may use function `generator_gamFormula_continuousInteraction()` generate one. may interested important term model. provide two ways quantification (see ). require running reduced model without term interest, thus take longer time run. can make request via argument changed.rsq.term.index, get quantifications. Delta adjusted R-squared (delta.adj.rsq) defined difference adjusted R-squared full model (full formula formula) reduced model (formula without term interest). Notice adjusted R-squared includes penalty model complexity. Partial R-squared (partial.rsq) defined : (sse.reduced.model - sse.full.model) / sse.reduced.model, sse error sum squares (, residual sum squares). quantifies amount variance response variable explained reduced model (model without term interest), can explained term interest full model. ___!!! WARNING !!!___: want request changed.rsq.term.index term missing values, feeding phenotypes ModelArray.gam(), must exclude observations (.e., rows phenotypes) missing values term interest phenotypes. term like request changed.rsq.term.index, term missing values. Without exclusion, full reduced models include different number subjects, causing inaccuracy calculation delta.adj.rsq partial.rsq. notes changed.rsq.term.index: requesting changed.rsq.term.index, fx set TRUE, degree freedom fixed. formula interactions, formula formats tested, values interaction term valid. delta.adj.rsq partial.rsq main effect (s(x) Formula #1) may \"functionally\" metrics, definitions changed reduced formula without main effect interaction term. p-value corrections (arguments correct.p.value.*), supported methods include methods `p.adjust.methods` except \"none\". can request one method. FDR-corrected p-values (\"fdr\") calculated default. Turn setting \"none\". Please notice different `ModelArray.lm`, p.value GAM model, \"correct.p.value.model\" GAM model. Arguments num.subj.lthr.abs num.subj.lthr.rel mainly input data subject-specific masks, .e. currently volume data. fixel-wise data, may ignore arguments.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.html","id":null,"dir":"Reference","previous_headings":"","what":"An S4 class to represent element-wise scalar data and statistics. — ModelArray","title":"An S4 class to represent element-wise scalar data and statistics. — ModelArray","text":"S4 class represent element-wise scalar data statistics. Load element-wise data .h5 file ModelArray object","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"An S4 class to represent element-wise scalar data and statistics. — ModelArray","text":"","code":"ModelArray(filepath, scalar_types = c(\"FD\"), analysis_names = c(\"myAnalysis\")) ModelArray(filepath, scalar_types = c(\"FD\"), analysis_names = c(\"myAnalysis\"))"},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"An S4 class to represent element-wise scalar data and statistics. — ModelArray","text":"filepath file scalar_types expected scalars analysis_names subfolder names results .h5 file","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"An S4 class to represent element-wise scalar data and statistics. — ModelArray","text":"ModelArray object","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"An S4 class to represent element-wise scalar data and statistics. — ModelArray","text":": Tips debugging: run error: \"Error h(simpleError(msg, call)) : error evaluating argument 'seed' selecting method function 'DelayedArray': HDF5. Symbol table. open object.\" please check give correct \"scalar_types\" - check via rhdf5::h5ls(filename_for_h5)","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.html","id":"slots","dir":"Reference","previous_headings":"","what":"Slots","title":"An S4 class to represent element-wise scalar data and statistics. — ModelArray","text":"sources list source filenames scalars list element-wise scalar matrix results list statistical result matrix path Path h5 file disk","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit linear model for element-wise data — ModelArray.lm","title":"Fit linear model for element-wise data — ModelArray.lm","text":"`ModelArray.lm` fits linear model (`stats::lm()`) elements requested, returns tibble dataframe requested model statistics.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.lm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit linear model for element-wise data — ModelArray.lm","text":"","code":"ModelArray.lm( formula, data, phenotypes, scalar, element.subset = NULL, full.outputs = FALSE, var.terms = c(\"estimate\", \"statistic\", \"p.value\"), var.model = c(\"adj.r.squared\", \"p.value\"), correct.p.value.terms = c(\"fdr\"), correct.p.value.model = c(\"fdr\"), num.subj.lthr.abs = 10, num.subj.lthr.rel = 0.2, verbose = TRUE, pbar = TRUE, n_cores = 1, ... )"},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit linear model for element-wise data — ModelArray.lm","text":"formula Formula (passed `stats::lm()`) data ModelArray class phenotypes data.frame cohort columns independent variables covariates added model. contains column called \"source_file\", column match data. scalar character. name element-wise scalar analysed element.subset list positive integers (min = 1, max = number elements). subset elements want run. Default `NULL`, .e. requesting elements `data`. full.outputs TRUE FALSE, Whether return full set outputs. FALSE, return requested arguments var.* correct.p.value.*; TRUE, arguments var.* ignored, return possible statistics var.* options requested arguments correct.p.value.*. var.terms list characters. list variables save terms (got `broom::tidy()`). See \"Details\" section . var.model list characters. list variables save model (got `broom::glance()`). See \"Details\" section . correct.p.value.terms list characters. perform add column p.value correction term. Default: \"fdr\". See \"Details\" section . correct.p.value.model list characters. perform add column p.value correction model. Default: \"fdr\". See \"Details\" section . num.subj.lthr.abs integer, lower threshold absolute number subjects. element, number subjects finite values (defined `.finite()`, .e. NaN NA Inf) h5 file > num.subj.lthr.abs, element run normally; otherwise, element skipped statistical outputs set NaN. Default 10. num.subj.lthr.rel value 0-1, lower threshold relative number subjects. Similar num.subj.lthr.abs, proportion subjects valid value > num.subj.lthr.rel, element run normally; otherwise, element skipped statistical outputs set NaN. Default 0.2. verbose TRUE FALSE, print verbose message pbar TRUE FALSE, print progress bar n_cores Positive integer, number CPU cores run ... Additional arguments `stats::lm()`","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.lm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit linear model for element-wise data — ModelArray.lm","text":"Tibble summarized model statistics elements requested","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/ModelArray.lm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fit linear model for element-wise data — ModelArray.lm","text":"may request returning specific statistical variables setting var.*, can get setting full.outputs=TRUE. Note statistics covered full.outputs var.* ones broom::tidy() broom::glance() , include corrected p-values. However FDR-corrected p-values (\"fdr\") generated default. List acceptable statistic names var.*: var.terms: c(\"estimate\",\"std.error\",\"statistic\",\"p.value\"); interpretation please see tidy.lm. var.model: c(\"r.squared\", \"adj.r.squared\", \"sigma\", \"statistic\", \"p.value\", \"df\", \"logLik\", \"AIC\", \"BIC\", \"deviance\", \"df.residual\", \"nobs\"); interpretation please see glance.lm. p-value corrections (arguments correct.p.value.*), supported methods include methods `p.adjust.methods` except \"none\". Can one method. FDR-corrected p-values (\"fdr\") calculated default. Turn setting \"none\". Arguments num.subj.lthr.abs num.subj.lthr.rel mainly input data subject-specific masks, .e. currently volume data. fixel-wise data, may ignore arguments.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/analyseOneElement.gam.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit GAM for one element — analyseOneElement.gam","title":"Fit GAM for one element — analyseOneElement.gam","text":"`analyseOneElement.gam` fits GAM model one element data, returns requested model statistics.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/analyseOneElement.gam.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit GAM for one element — analyseOneElement.gam","text":"","code":"analyseOneElement.gam( i_element, formula, modelarray, phenotypes, scalar, var.smoothTerms, var.parametricTerms, var.model, num.subj.lthr, num.stat.output = NULL, flag_initiate = FALSE, flag_sse = FALSE, ... )"},{"path":"https://pennlinc.github.io/ModelArray/reference/analyseOneElement.gam.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit GAM for one element — analyseOneElement.gam","text":"i_element integer, i_th element, starting 1. initiating (flag_initiate = TRUE), use i_element=1 formula formula (passed `mgcv::gam()`) modelarray ModelArray class phenotypes data.frame cohort columns independent variables covariates added model scalar character. name element-wise scalar analysed var.smoothTerms list variables save smooth terms (got broom::tidy(parametric = FALSE)). Example smooth term: age formula \"outcome ~ s(age)\". var.parametricTerms list variables save parametric terms (got broom::tidy(parametric = TRUE)). Example parametric term: sex formula \"outcome ~ s(age) + sex\". var.model list variables save model (got broom::glance() summary()). num.subj.lthr minimal number subjects valid value input h5 file, .e. number subjects finite values (defined `.finite()`, .e. NaN NA Inf) h5 file > num.subj.lthr, element run normally; otherwise, element skipped statistical outputs set NaN. num.stat.output number output stat metrics (generating NaN stat # subjects meet criteria). includes column `element_id`. required flag_initiate = TRUE. flag_initiate TRUE FALSE, Whether initiate new analysis. TRUE, return column names etc used initiating data.frame; FALSE, return list requested statistic values. flag_sse TRUE FALSE, Whether calculate SSE (sum squared error) model (`model.sse`). SSE needed calculating partial R-squared. ... Additional arguments `mgcv::gam()`","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/analyseOneElement.gam.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit GAM for one element — analyseOneElement.gam","text":"flag_initiate==TRUE, returns column names, list term names final results, attr.name sp.criterion; flag_initiate==FALSE, return list requested statistic values element.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/analyseOneElement.gam.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fit GAM for one element — analyseOneElement.gam","text":"`ModelArray.gam` iteratively calls function get statistics requested elements.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/analyseOneElement.lm.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit linear model for one element. — analyseOneElement.lm","title":"Fit linear model for one element. — analyseOneElement.lm","text":"`analyseOneElement.lm` fits linear model one element data, returns requested model statistics.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/analyseOneElement.lm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit linear model for one element. — analyseOneElement.lm","text":"","code":"analyseOneElement.lm( i_element, formula, modelarray, phenotypes, scalar, var.terms, var.model, num.subj.lthr, num.stat.output = NULL, flag_initiate = FALSE, ... )"},{"path":"https://pennlinc.github.io/ModelArray/reference/analyseOneElement.lm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit linear model for one element. — analyseOneElement.lm","text":"i_element integer, i_th element, starting 1. initiating (flag_initiate = TRUE), use i_element=1 formula Formula (passed `stats::lm()`) modelarray ModelArray class phenotypes data.frame cohort columns independent variables covariates added model. scalar character. name element-wise scalar analysed var.terms list characters. list variables save terms (got `broom::tidy()`). var.model list characters. list variables save model (got `broom::glance()`). num.subj.lthr minimal number subjects valid value input h5 file, .e. number subjects finite values (defined `.finite()`, .e. NaN NA Inf) h5 file > num.subj.lthr, element run normally; otherwise, element skipped statistical outputs set NaN. num.stat.output number output stat metrics (generating NaN stat # subjects meet criteria). includes column `element_id`. required flag_initiate = TRUE. flag_initiate TRUE FALSE, Whether initiate new analysis. TRUE, return column names etc used initiating data.frame; FALSE, return list requested statistic values. ... Additional arguments `stats::lm()`","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/analyseOneElement.lm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit linear model for one element. — analyseOneElement.lm","text":"flag_initiate==TRUE, returns column names, list term names final results; flag_initiate==FALSE, return list requested statistic values element.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/analyseOneElement.lm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fit linear model for one element. — analyseOneElement.lm","text":"`ModelArray.lm` iteratively calls function get statistics requested elements.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/check_validity_correctPValue.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if the list of p-value correction methods are valid for a specific type of term/model. \nCan be used for any statistical model. As long as the p.value to be correct is named as ","title":"Check if the list of p-value correction methods are valid for a specific type of term/model. \nCan be used for any statistical model. As long as the p.value to be correct is named as ","text":"Check list p-value correction methods valid specific type term/model. Can used statistical model. long p.value correct named \"p.value\".","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/check_validity_correctPValue.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if the list of p-value correction methods are valid for a specific type of term/model. \nCan be used for any statistical model. As long as the p.value to be correct is named as ","text":"","code":"check_validity_correctPValue( correct.list, name.correct.list, var.list, name.var.list )"},{"path":"https://pennlinc.github.io/ModelArray/reference/check_validity_correctPValue.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if the list of p-value correction methods are valid for a specific type of term/model. \nCan be used for any statistical model. As long as the p.value to be correct is named as ","text":"correct.list list correction methods type term/model name.correct.list name list correction methods type term/model var.list list statistics saved type term/model name.var.list name list statistics saved type term/model","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/checker_gam_formula.html","id":null,"dir":"Reference","previous_headings":"","what":"A checker for formula in gam for ModelArray.gam()\nTODO: finish the description — checker_gam_formula","title":"A checker for formula in gam for ModelArray.gam()\nTODO: finish the description — checker_gam_formula","text":"checker formula gam ModelArray.gam() TODO: finish description","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/checker_gam_formula.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"A checker for formula in gam for ModelArray.gam()\nTODO: finish the description — checker_gam_formula","text":"","code":"checker_gam_formula(formula, gam.formula.breakdown, onemodel = NULL)"},{"path":"https://pennlinc.github.io/ModelArray/reference/checker_gam_s.html","id":null,"dir":"Reference","previous_headings":"","what":"Print out important arguments in smooth terms s() in mgcv::gam() formula\nref: https://www.rdocumentation.org/packages/mgcv/versions/1.8-38/topics/s\nTODO: finish the description — checker_gam_s","title":"Print out important arguments in smooth terms s() in mgcv::gam() formula\nref: https://www.rdocumentation.org/packages/mgcv/versions/1.8-38/topics/s\nTODO: finish the description — checker_gam_s","text":"Print important arguments smooth terms s() mgcv::gam() formula ref: https://www.rdocumentation.org/packages/mgcv/versions/1.8-38/topics/s TODO: finish description","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/checker_gam_s.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print out important arguments in smooth terms s() in mgcv::gam() formula\nref: https://www.rdocumentation.org/packages/mgcv/versions/1.8-38/topics/s\nTODO: finish the description — checker_gam_s","text":"","code":"checker_gam_s(ofInterest)"},{"path":"https://pennlinc.github.io/ModelArray/reference/checker_gam_s.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print out important arguments in smooth terms s() in mgcv::gam() formula\nref: https://www.rdocumentation.org/packages/mgcv/versions/1.8-38/topics/s\nTODO: finish the description — checker_gam_s","text":"ofInterest got via: gam.formula.breakdown <- mgcv::interpret.gam(formula); ofInterest <- gam.formula.breakdown$smooth.spec[[]]","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/checker_gam_t.html","id":null,"dir":"Reference","previous_headings":"","what":"Print out important arguments in smooth term te() or ti() or t2() in mgcv::gam() formula\nWhy a separate function is needed for t(), cannot using s(): in ofInterest, ","title":"Print out important arguments in smooth term te() or ti() or t2() in mgcv::gam() formula\nWhy a separate function is needed for t(), cannot using s(): in ofInterest, ","text":"Print important arguments smooth term te() ti() t2() mgcv::gam() formula separate function needed t(), using s(): ofInterest, \"fx\" \"fx\" t(), \"fixed\" s() - different. ref: https://www.rdocumentation.org/packages/mgcv/versions/1.8-38/topics/te /t2() TODO: finish description","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/checker_gam_t.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print out important arguments in smooth term te() or ti() or t2() in mgcv::gam() formula\nWhy a separate function is needed for t(), cannot using s(): in ofInterest, ","text":"","code":"checker_gam_t(FUN, ofInterest)"},{"path":"https://pennlinc.github.io/ModelArray/reference/checker_gam_t.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print out important arguments in smooth term te() or ti() or t2() in mgcv::gam() formula\nWhy a separate function is needed for t(), cannot using s(): in ofInterest, ","text":"FUN mgcv::te(), ti() t2() ofInterest got via: gam.formula.breakdown <- mgcv::interpret.gam(formula); ofInterest <- gam.formula.breakdown$smooth.spec[[]]","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/generator_gamFormula_continuousInteraction.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate GAM formula with continuous*continuous interaction — generator_gamFormula_continuousInteraction","title":"Generate GAM formula with continuous*continuous interaction — generator_gamFormula_continuousInteraction","text":"function generate formula following format: y ~ ti(x) + ti(z) + ti(x,z), y response.var, x cont1.var, z cont2.var. formula generated modified, e.g. adding covariates.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/generator_gamFormula_continuousInteraction.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate GAM formula with continuous*continuous interaction — generator_gamFormula_continuousInteraction","text":"","code":"generator_gamFormula_continuousInteraction( response.var, cont1.var, cont2.var, fx = TRUE, k = NULL )"},{"path":"https://pennlinc.github.io/ModelArray/reference/generator_gamFormula_continuousInteraction.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate GAM formula with continuous*continuous interaction — generator_gamFormula_continuousInteraction","text":"response.var character class, variable name response cont1.var character class, name first continuous variable cont2.var character class, name second continuous variable fx TRUE FALSE, used smooth term s(). Recommend TRUE. k integer, used smooth term including interaction term. NULL (entry), use default value mgcv::s()","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/generator_gamFormula_continuousInteraction.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate GAM formula with continuous*continuous interaction — generator_gamFormula_continuousInteraction","text":"formula generated","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/generator_gamFormula_factorXsmooth.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate GAM formula with factor-smooth interaction — generator_gamFormula_factorXsmooth","title":"Generate GAM formula with factor-smooth interaction — generator_gamFormula_factorXsmooth","text":"function generate formula following format: y ~ orderedFactor + s(x) + s(x, =orderedFactor), y response.var, x smooth.var, orderedFactor factor.var - see factor.var . formula generated modified, e.g. adding covariates.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/generator_gamFormula_factorXsmooth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate GAM formula with factor-smooth interaction — generator_gamFormula_factorXsmooth","text":"","code":"generator_gamFormula_factorXsmooth( response.var, factor.var, smooth.var, phenotypes, reference.group = NULL, prefix.ordered.factor = \"o\", fx = TRUE, k = NULL )"},{"path":"https://pennlinc.github.io/ModelArray/reference/generator_gamFormula_factorXsmooth.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate GAM formula with factor-smooth interaction — generator_gamFormula_factorXsmooth","text":"response.var character class, variable name response factor.var character class, variable name factor. ordered factor. , generate new column `phenotypes`, requires `reference.group`. smooth.var character class, variable name smooth term main effect phenotypes data.frame class, cohort matrix columns independent variables (including factor.var smooth.var) added model reference.group character class, reference group ordered factor `factor.var`; required `factor.var` `phenotypes` ordered factor. prefix.ordered.factor character class, prefix ordered factor; required `factor.var` `phenotypes` ordered factor. fx TRUE FALSE, used smooth term s(). Recommend TRUE. k integer, used smooth term including interaction term. NULL (entry), use default value mgcv::s()","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/generator_gamFormula_factorXsmooth.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate GAM formula with factor-smooth interaction — generator_gamFormula_factorXsmooth","text":"list, including: 1) formula generated; 2) data.frame phenotypes - updated argument factor.var ordered factor","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/numElementsTotal.html","id":null,"dir":"Reference","previous_headings":"","what":"Number of elements in ModelArray — numElementsTotal","title":"Number of elements in ModelArray — numElementsTotal","text":"Returns number elements ModelArray, specific scalar","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/numElementsTotal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Number of elements in ModelArray — numElementsTotal","text":"","code":"numElementsTotal(modelarray, scalar_name = \"FD\")"},{"path":"https://pennlinc.github.io/ModelArray/reference/numElementsTotal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Number of elements in ModelArray — numElementsTotal","text":"modelarray ModelArray class scalar_name character, scalar name (one existing scalar modelarray)","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/numElementsTotal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Number of elements in ModelArray — numElementsTotal","text":"number elements ModelArray, specific scalar","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/pipe.html","id":null,"dir":"Reference","previous_headings":"","what":"Pipe operator — %>%","title":"Pipe operator — %>%","text":"See magrittr::%>% details.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/pipe.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pipe operator — %>%","text":"","code":"lhs %>% rhs"},{"path":"https://pennlinc.github.io/ModelArray/reference/pipe.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pipe operator — %>%","text":"lhs value magrittr placeholder. rhs function call using magrittr semantics.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/pipe.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pipe operator — %>%","text":"result calling `rhs(lhs)`.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/printAdditionalArgu.html","id":null,"dir":"Reference","previous_headings":"","what":"print the additional arguments settings — printAdditionalArgu","title":"print the additional arguments settings — printAdditionalArgu","text":"print additional arguments settings","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/printAdditionalArgu.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"print the additional arguments settings — printAdditionalArgu","text":"","code":"printAdditionalArgu( FUN, argu_name, dots, message_default = NULL, message_usr_input = NULL )"},{"path":"https://pennlinc.github.io/ModelArray/reference/printAdditionalArgu.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"print the additional arguments settings — printAdditionalArgu","text":"FUN function, e.g. mgcv::gam, without \"()\" argu_name argument name function message_default message default message_usr_input message describing user's input dots: list additional arguments","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/results-ModelArray-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Statistical results of an ModelArray object — results,ModelArray-method","title":"Statistical results of an ModelArray object — results,ModelArray-method","text":"Statistical results ModelArray object","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/results-ModelArray-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Statistical results of an ModelArray object — results,ModelArray-method","text":"","code":"# S4 method for ModelArray results(x, ...)"},{"path":"https://pennlinc.github.io/ModelArray/reference/results-ModelArray-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Statistical results of an ModelArray object — results,ModelArray-method","text":"x ModelArray object ... Additional arguments. Currently accept analysis name (character)","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/results-ModelArray-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Statistical results of an ModelArray object — results,ModelArray-method","text":"Statistical results ModelArray object","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/scalars-ModelArray-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Element-wise scalar data of an ModelArray object — scalars,ModelArray-method","title":"Element-wise scalar data of an ModelArray object — scalars,ModelArray-method","text":"Element-wise scalar data ModelArray object","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/scalars-ModelArray-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Element-wise scalar data of an ModelArray object — scalars,ModelArray-method","text":"","code":"# S4 method for ModelArray scalars(x, ...)"},{"path":"https://pennlinc.github.io/ModelArray/reference/scalars-ModelArray-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Element-wise scalar data of an ModelArray object — scalars,ModelArray-method","text":"x ModelArray object ... Additional arguments. Currently accept scalar name (character)","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/scalars-ModelArray-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Element-wise scalar data of an ModelArray object — scalars,ModelArray-method","text":"matrix element-wise scalar data: elements (row) source files (column).","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/show-ModelArray-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Show ModelArray object — show,ModelArray-method","title":"Show ModelArray object — show,ModelArray-method","text":"Print basic information ModelArray object, including number source files, scalar names, analysis names.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/show-ModelArray-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Show ModelArray object — show,ModelArray-method","text":"","code":"# S4 method for ModelArray show(object)"},{"path":"https://pennlinc.github.io/ModelArray/reference/show-ModelArray-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Show ModelArray object — show,ModelArray-method","text":"object ModelArray object","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/sources-ModelArray-method.html","id":null,"dir":"Reference","previous_headings":"","what":"Source filenames of an ModelArray object — sources,ModelArray-method","title":"Source filenames of an ModelArray object — sources,ModelArray-method","text":"Source filenames ModelArray object","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/sources-ModelArray-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Source filenames of an ModelArray object — sources,ModelArray-method","text":"","code":"# S4 method for ModelArray sources(x)"},{"path":"https://pennlinc.github.io/ModelArray/reference/sources-ModelArray-method.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Source filenames of an ModelArray object — sources,ModelArray-method","text":"x ModelArray object","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/sources-ModelArray-method.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Source filenames of an ModelArray object — sources,ModelArray-method","text":"list source filenames","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/subjects-ModelArray-method.html","id":null,"dir":"Reference","previous_headings":"","what":"subjects of ModelArray — subjects,ModelArray-method","title":"subjects of ModelArray — subjects,ModelArray-method","text":"subjects ModelArray","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/subjects-ModelArray-method.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"subjects of ModelArray — subjects,ModelArray-method","text":"","code":"# S4 method for ModelArray subjects(x)"},{"path":"https://pennlinc.github.io/ModelArray/reference/writeResults.html","id":null,"dir":"Reference","previous_headings":"","what":"Write outputs from element-wise statistical analysis to the HDF5 file. — writeResults","title":"Write outputs from element-wise statistical analysis to the HDF5 file. — writeResults","text":"Create group named `analysis_name` HDF5 file, write statistical results data.frame (.e. one analysis) .","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/writeResults.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write outputs from element-wise statistical analysis to the HDF5 file. — writeResults","text":"","code":"writeResults( fn.output, df.output, analysis_name = \"myAnalysis\", overwrite = TRUE )"},{"path":"https://pennlinc.github.io/ModelArray/reference/writeResults.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write outputs from element-wise statistical analysis to the HDF5 file. — writeResults","text":"fn.output character, HDF5 (.h5) filename output df.output data.frame object element-wise statistical results, returned `ModelArray.lm()` etc analysis_name character, name results overwrite group analysis_name exists HDF5 file, whether overwrite (TRUE) (FALSE)","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/writeResults.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Write outputs from element-wise statistical analysis to the HDF5 file. — writeResults","text":"debug tip: \"Error H5File.open(filename, mode, file_create_pl, file_access_pl)\", check message 'file directory'. Try absolute .h5 filename.","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/writeResults.old.html","id":null,"dir":"Reference","previous_headings":"","what":"Write outputs from fixel-based analysis out to the h5 file. Write one results (i.e. for one analysis) at a time. This is ","title":"Write outputs from fixel-based analysis out to the h5 file. Write one results (i.e. for one analysis) at a time. This is ","text":"Write outputs fixel-based analysis h5 file. Write one results (.e. one analysis) time. \".old\": writing results multiple rows one fixel","code":""},{"path":"https://pennlinc.github.io/ModelArray/reference/writeResults.old.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write outputs from fixel-based analysis out to the h5 file. Write one results (i.e. for one analysis) at a time. This is ","text":"","code":"writeResults.old( modelarray, data, analysis_name = \"myAnalysis\", flag_overwrite = TRUE )"},{"path":"https://pennlinc.github.io/ModelArray/reference/writeResults.old.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write outputs from fixel-based analysis out to the h5 file. Write one results (i.e. for one analysis) at a time. This is ","text":"modelarray ModelArray object data data.frame object model results fixel analysis_name subfolder name results, holding analysis results flag_overwrite analysis_name exists, whether overwrite ","code":""}]
Zhao C, Tapera T, Cieslak M, Satterthwaite T (2023). ModelArray: An R package for statistical analysis of fixel-wise data and beyond. -R package version 0.1.4.9000, https://pennlinc.github.io/ModelArray. +R package version 0.1.5, https://pennlinc.github.io/ModelArray.
@Manual{, title = {ModelArray: An R package for statistical analysis of fixel-wise data and beyond}, author = {Chenying Zhao and Tinashe Tapera and Matthew Cieslak and Theodore Satterthwaite}, year = {2023}, - note = {R package version 0.1.4.9000}, + note = {R package version 0.1.5}, url = {https://pennlinc.github.io/ModelArray}, }