Package: fmrilss 0.1.0

fmrilss: Least Squares Separate (LSS) Analysis for fMRI Data

Implements efficient least squares separate (LSS) analysis for functional magnetic resonance imaging (fMRI) data. LSS is used to estimate trial-by-trial activation patterns in event-related fMRI designs. The package provides both R and C++ implementations for computational efficiency.

Authors:Brad Buchsbaum [aut, cre]

fmrilss_0.1.0.tar.gz
fmrilss_0.1.0.zip(r-4.7-x86_64)fmrilss_0.1.0.zip(r-4.6-x86_64)fmrilss_0.1.0.zip(r-4.5-x86_64)
fmrilss_0.1.0.tgz(r-4.6-x86_64)fmrilss_0.1.0.tgz(r-4.6-arm64)fmrilss_0.1.0.tgz(r-4.5-x86_64)fmrilss_0.1.0.tgz(r-4.5-arm64)
fmrilss_0.1.0.tar.gz(r-4.7-arm64)fmrilss_0.1.0.tar.gz(r-4.7-x86_64)fmrilss_0.1.0.tar.gz(r-4.6-arm64)fmrilss_0.1.0.tar.gz(r-4.6-x86_64)
fmrilss_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
fmrilss/json (API)

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

Bug tracker:https://github.com/bbuchsbaum/fmrilss/issues

Pkgdown/docs site:https://bbuchsbaum.github.io

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library

On CRAN:

Conda:

openblascppopenmp

5.66 score 1 stars 2 packages 23 scripts 43 exports 45 dependencies

Last updated from:e8d305562b. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK265
linux-devel-x86_64OK298
source / vignettesOK342
linux-release-arm64OK226
linux-release-x86_64OK277
macos-release-arm64OK198
macos-release-x86_64OK327
macos-oldrel-arm64OK184
macos-oldrel-x86_64OK392
windows-devel-x86_64OK266
windows-release-x86_64OK268
windows-oldrel-x86_64OK252
wasm-releaseOK187

Exports:benchmark_mixed_solvecalculate_recovery_metricscompare_hrf_recoverycreate_lwu_gridestimate_voxel_hrffit_oasis_gridgenerate_lwu_datagenerate_rapid_designget_data_matrixitem_build_designitem_compute_uitem_cvitem_fititem_from_lsaitem_predictitem_slice_foldlsalsslss_beta_cpplss_cpp_optimizedlss_designlss_naivelss_naive_fitlss_optimizedlss_optimized_fitlss_sbhmlss_sbhm_designlss_with_hrfmixed_precomputemixed_solvemixed_solve_cppmixed_solve_optimizedoasis_optionsplot_hrf_comparisonprewhiten_optionsproject_confoundsproject_confounds_cppsbhm_buildsbhm_hrfsbhm_matchsbhm_prepasssbhm_projectstglmnet_options

Dependencies:assertthatBHbigmemorybigmemory.sricachemclicodetoolscpp11farverfastmapfmriARfmrihrfforeachggplot2glmnetgluegtableisobanditeratorsjsonlitelabelinglatticelifecyclemagrittrMASSMatrixmemoisenumDerivpracmapurrrR6RColorBrewerRcppRcppArmadilloRcppEigenrlangroptimS7scalesshapesurvivaluuidvctrsviridisLitewithr

Getting started with fmrilss
Why fmrilss? | Quick example | Create a rapid event design | Add baseline and nuisance regressors | Simulate data with known ground truth | Run LSS | LSS vs standard GLM | Prewhitening | Computational backends | OASIS: single-pass LSS with extras | Nuisance pre-projection | Next steps | References

Last update: 2026-04-11
Started: 2026-02-06

OASIS Theory: Algebra and Implementation Details
Motivation | Prerequisites | Computational Intuition | Visual Comparison of Computational Scaling | Classical LSS Recap | Single-Basis OASIS Algebra | Fractional Ridge | Standard Errors | Multi-Basis Extension | [\begin | HRF-Aware Design Construction | AR(1) Whitening | Diagnostics Output | Algorithm Summary | Complexity and Memory | Next Steps | References

Last update: 2026-04-11
Started: 2025-09-15

Shared-Basis HRF Matching (SBHM): Efficient Voxel-Specific HRF Estimation
The Problem | Step 1: Build the Shared Basis | Visualizing the Basis | Choosing the Rank | Library Coverage | Step 2: Generate Synthetic Data | Step 3: Run the SBHM Pipeline | Step 4: Evaluate Recovery | Matching Accuracy | Matching Confidence | Amplitude Recovery | Recovered HRF Shapes | Library Manifold | Soft Assignment for Ambiguous Voxels | Shape Estimation Strategies | Low-Confidence Gating | Amplitude Policy | Returning Coefficients for Custom Analysis | Parameter Quick Reference | Performance Considerations | Prewhitening | References | Summary

Last update: 2026-04-11
Started: 2025-10-31

The OASIS Method: Optimized Analytic Single-pass Inverse Solution
What OASIS Adds Over Plain LSS | Synthetic Data | Basic OASIS Call | Equivalence to LSS | Ridge Regularization | Absolute Ridge | Fractional Ridge | Multi-Basis HRFs | FIR Basis | HRF Grid Search | Multiple Conditions | Standard Errors | Prewhitening | When to Use OASIS | Next Steps

Last update: 2026-04-11
Started: 2025-08-23

Using fmridesign with fmrilss
Introduction | When to Use lss_design() | When to Use Traditional lss() | Simulated Data Setup | Quick Start | Multi-Run Experiments | Onset Convention: Run-Relative | Why Run-Relative Onsets? | Adding Baseline Correction | Adding Motion Parameters | Multi-Basis HRFs | Ridge Regularization | Comparison with design_spec | Using design_spec (old approach) | Using lss_design() (new approach) | Validation: Estimated vs True Betas | Advanced: Parametric Modulators | Troubleshooting | Error: "Y has X rows but sampling_frame expects Y scans" | Error: "event_model and baseline_model have different sampling_frames" | Warning: "High collinearity detected" | Summary | Further Reading

Last update: 2026-04-11
Started: 2025-11-06

Voxel-wise HRF Modeling with fmrilss
Why HRF Variability Matters | Setup | Simulate Data with Variable HRFs | Experiment parameters | Voxel-specific HRFs | Generate signal and noise | Visualise the design | Standard LSS with Canonical HRF | Estimate Voxel-Specific HRFs | Multi-basis GLM | Apply Voxel-Specific HRFs in LSS | OASIS Alternative | Compare Methods | Compute accuracy metrics | Scatter plots | Next Steps

Last update: 2026-04-11
Started: 2025-06-16

Readme and manuals

Help Manual

Help pageTopics
Benchmark Mixed Model Implementationsbenchmark_mixed_solve
Calculate HRF Recovery Metricscalculate_recovery_metrics
Compare HRF Recovery Methodscompare_hrf_recovery
Create LWU HRF Grid for OASIS Searchcreate_lwu_grid
Estimate Voxel-wise HRF Basis Coefficientsestimate_voxel_hrf
Fit OASIS with HRF Grid Searchfit_oasis_grid
Option constructors for nested interfacesfmrilss_options
Generate Synthetic fMRI Data with LWU HRFgenerate_lwu_data
OASIS HRF Recovery Testing Functionsgenerate_rapid_design
Build ITEM design metadataitem_build_design
Compute ITEM trial covariance matrixitem_compute_u
Crossvalidated ITEM decodingitem_cv
Fit ITEM decoder weightsitem_fit
Build an ITEM bundle from LS-A estimatesitem_from_lsa
Predict targets from ITEM weightsitem_predict
Slice an ITEM bundle into train/test fold objectsitem_slice_fold
Least Squares All (LSA) Analysislsa
Least Squares Separate (LSS) Analysislss
Vectorized LSS Beta Computation Using C++lss_beta_cpp
A wrapper for the optimized C++ LSS implementationlss_cpp_optimized
LSS Analysis with fmridesign Objectslss_design
Convenience wrappers for modern 'lss()' usagelss_fit_wrappers
Naive Least Squares Separate (LSS) Analysislss_naive
Naive LSS with modern signaturelss_naive_fit
Optimized LSS Analysis (Pure R)lss_optimized
Optimized LSS with modern signaturelss_optimized_fit
End-to-End LSS with Shared-Basis HRF Matching (SBHM)lss_sbhm
SBHM Pipeline with fmridesign Modelslss_sbhm_design
Perform LSS using Voxel-wise HRFslss_with_hrf
LSSBeta objectLSSBeta
Precompute Workspace for Optimized Mixed Modelmixed_precompute
Mixed Model Solvermixed_solve mixed_solve_cpp
Optimized Mixed Model Solvermixed_solve_optimized
Construct OASIS optionsoasis_options
Plot HRF Recovery Comparisonplot_hrf_comparison
Construct prewhitening optionsprewhiten_options
Project Out Confound Variablesproject_confounds
Project Out Confounds Using C++project_confounds_cpp
Build a Shared-Basis HRF Library (SBHM)sbhm_build
Wrap a Learned Basis as an HRF (SBHM HRF)sbhm_hrf
Match Voxels to Library HRFs in Shared Basis (SBHM)sbhm_match
SBHM Prepass: Aggregate Fit in Shared Basissbhm_prepass
Project Trial-wise SBHM Coefficients to Scalar Amplitudessbhm_project
Construct stglmnet backend optionsstglmnet_options
VoxelHRF objectVoxelHRF