Getting Started with HATSA
HATSA (Hyperalignment via Task-informed Shared Analysis) provides state-of-the-art methods for aligning functional brain data across subjects. This guide will get you started quickly.
Your First Alignment
The simplest way to use HATSA is with the hatsa()
function:
# Assume you have a list of subject data matrices
# Each matrix is timepoints × voxels
result <- hatsa(subject_data)
# That's it! HATSA automatically:
# - Selects optimal anchors
# - Chooses appropriate parameters
# - Performs the alignment
Understanding Your Results
HATSA provides simple functions to explore your results:
# Get a quick summary
hatsa_summary(result)
# Extract aligned data
aligned_data <- get_aligned_data(result)
# Get the group template
template <- get_template(result)
# Visualize alignment quality
plot_hatsa(result, type = "eigenvalues")
Choosing Parameters
Not sure what parameters to use? Let HATSA help:
# Get suggestions based on your data
params <- hatsa_suggest(subject_data)
# Use the suggestions
result <- hatsa(subject_data,
components = params$components,
preset = params$preset)
Task-Informed Alignment
If you have task information, HATSA can use it to improve alignment:
# Automatic method selection
result <- hatsa_task(subject_data, task_data)
# Or choose a specific method
result <- hatsa_task(subject_data, task_data, method = "blend")
Next Steps
- Read the Task-HATSA Guide for task-informed analyses
- See Advanced Usage for custom configurations
- Check Troubleshooting for common issues
Getting Help
# Built-in documentation
?hatsa
?hatsa_task
# Parameter validation
hatsa_validate_params(subject_data,
anchor_indices = my_anchors,
spectral_rank_k = 30)