Package: templateICAr 0.8.8

templateICAr: Estimate Brain Networks and Connectivity with ICA and Empirical Priors

Implements the template ICA (independent components analysis) model proposed in Mejia et al. (2020) <doi:10.1080/01621459.2019.1679638> and the spatial template ICA model proposed in proposed in Mejia et al. (2022) <doi:10.1080/10618600.2022.2104289>. Both models estimate subject-level brain as deviations from known population-level networks, which are estimated using standard ICA algorithms. Both models employ an expectation-maximization algorithm for estimation of the latent brain networks and unknown model parameters. Includes direct support for 'CIFTI', 'GIFTI', and 'NIFTI' neuroimaging file formats.

Authors:Amanda Mejia [aut, cre], Damon Pham [aut], Daniel Spencer [ctb], Mary Beth Nebel [ctb]

templateICAr_0.8.8.tar.gz
templateICAr_0.8.8.zip(r-4.5)templateICAr_0.8.8.zip(r-4.4)templateICAr_0.8.8.zip(r-4.3)
templateICAr_0.8.8.tgz(r-4.4-x86_64)templateICAr_0.8.8.tgz(r-4.4-arm64)templateICAr_0.8.8.tgz(r-4.3-x86_64)templateICAr_0.8.8.tgz(r-4.3-arm64)
templateICAr_0.8.8.tar.gz(r-4.5-noble)templateICAr_0.8.8.tar.gz(r-4.4-noble)
templateICAr_0.8.8.tgz(r-4.4-emscripten)templateICAr_0.8.8.tgz(r-4.3-emscripten)
templateICAr.pdf |templateICAr.html
templateICAr/json (API)
NEWS

# Install 'templateICAr' in R:
install.packages('templateICAr', repos = c('https://mandymejia.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/mandymejia/templateicar/issues

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

6.02 score 10 stars 24 scripts 22k downloads 17 exports 75 dependencies

Last updated 1 months agofrom:d415201095. Checks:OK: 8 NOTE: 1. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 14 2024
R-4.5-win-x86_64OKNov 14 2024
R-4.5-linux-x86_64OKNov 14 2024
R-4.4-win-x86_64OKNov 14 2024
R-4.4-mac-x86_64OKNov 14 2024
R-4.4-mac-aarch64OKNov 14 2024
R-4.3-win-x86_64NOTENov 14 2024
R-4.3-mac-x86_64OKNov 14 2024
R-4.3-mac-aarch64OKNov 14 2024

Exports:activationsdim_reduceestimate_templateestimate_template_FCestimate_template_from_DRexport_templategetInvCovARGibbs_AS_posteriorCPPgroupICA.ciftimake_meshmake_mesh_2Dnorm_BOLDorthonormresample_templatesqrt_XtXtemplateICAUpdateTheta_FCtemplateICAcpp

Dependencies:abindcellWiseclassclassIntclicodetoolscolorspaceDBIDEoptimRdplyre1071excursionsexpmfansifarverfmesherfMRIscrubfMRItoolsforeachgamlssgamlss.datagamlss.distgenericsggplot2gluegridExtragtableicaisobanditeratorsKernSmoothlabelinglatticelifecyclemagrittrMASSMatrixmatrixStatsmgcvmunsellmvtnormnlmepcaPPpeselpillarpkgconfigplyrproxyR6RColorBrewerRcppRcppArmadilloRcppEigenreshape2rlangrobustbaserrcovs2scalessfshapespSQUAREMstringistringrsurvivalsvdtibbletidyselectunitsutf8vctrsviridisLitewithrwk

Readme and manuals

Help Manual

Help pageTopics
templateICAr: Estimate Brain Networks and Connectivity with ICA and Empirical PriorstemplateICAr-package templateICAr
Activations of (spatial) template ICAactivations
Bdiag m2bdiag_m2
Cholesky-based FC samplingChol_samp_fun
PCA-based Dimension Reduction and Prewhiteningdim_reduce
EM Algorithms for Template ICA ModelsEM_templateICA EM_templateICA.independent EM_templateICA.spatial
Universally estimate IW dof parameter nu based on method of moments, so that no empirical variance is under-estimatedestimate_nu
Estimate IW dof parameter nu based on method of momentsestimate_nu_matrix
Estimate templateestimate_template estimate_template.cifti estimate_template.gifti estimate_template.nifti
Estimate FC templateestimate_template_FC
Estimate template from DRestimate_template_from_DR
Estimation of effective sample sizeestimate.ESS
Export templateexport_template
Compute inverse covariance matrix for AR process (up to a constant scaling factor)getInvCovAR
Use a Gibbs sampler for the A and S variables (E-step of the EM)Gibbs_AS_posteriorCPP
Perform group ICA based on CIFTI datagroupICA.cifti
Compute theoretical Inverse-Wishart variance of covariance matrix elementsIW_var
Compute theoretical Inverse-Wishart variance of correlation matrix elementsIW_var_cor
Compute likelihood in SPDE model for ESS estimationlik
Make INLA mesh from '"surf"' objectmake_mesh
Make 2D INLA meshmake_mesh_2D
Normalize BOLD datanorm_BOLD
Orthonormalizes a square, invertible matrixorthonorm
Plot templateplot.template.cifti
Plot templateplot.template.gifti
Plot templateplot.template.matrix
Plot templateplot.template.nifti
Plot activationsplot.tICA_act.cifti
Plot templateplot.tICA.cifti
Plot templateplot.tICA.matrix
Plot templateplot.tICA.nifti
Estimate residual autocorrelation for prewhiteningpw_estimate
Resample CIFTI templateresample_template
Compute matrix square root of X'Xsqrt_XtX
Summarize a '"template.cifti"' objectprint.summary.template.cifti print.template.cifti summary.template.cifti
Summarize a '"template.gifti"' objectprint.summary.template.gifti print.template.gifti summary.template.gifti
Summarize a '"template.matrix"' objectprint.summary.template.matrix print.template.matrix summary.template.matrix
Summarize a '"template.nifti"' objectprint.summary.template.nifti print.template.nifti summary.template.nifti
Summarize a '"tICA_act.cifti"' objectprint.summary.tICA_act.cifti print.tICA_act.cifti summary.tICA_act.cifti
Summarize a '"tICA_act.matrix"' objectprint.summary.tICA_act.matrix print.tICA_act.matrix summary.tICA_act.matrix
Summarize a '"tICA_act.nifti"' objectprint.summary.tICA_act.nifti print.tICA_act.nifti summary.tICA_act.nifti
Summarize a '"tICA.cifti"' objectprint.summary.tICA.cifti print.tICA.cifti summary.tICA.cifti
Summarize a '"tICA.matrix"' objectprint.summary.tICA.matrix print.tICA.matrix summary.tICA.matrix
Summarize a '"tICA.nifti"' objectprint.summary.tICA.nifti print.tICA.nifti summary.tICA.nifti
Template ICAtemplateICA
Update parameters (M-step of the EM)UpdateTheta_FCtemplateICAcpp
Parameter Estimates in EM Algorithm for Template ICA ModelUpdateTheta_templateICA UpdateTheta_templateICA.independent UpdateTheta_templateICA.spatial
Transform upper-triangular elements to matrix formUT2mat
Compute the error between empirical and theoretical variance of covariance matrix elementsvar_sq_err
Compute the overall error between empirical and theoretical variance of CORRELATION matrix elementsvar_sq_err_constrained