Functional data analysis of arm curl and knock movement data using advanced statistical methods.
This repository contains the complete analysis pipeline for our research on functional data analysis of movement patterns. The project focuses on:
- Movement analysis across multiple participants
- Functional data registration and alignment techniques
- Statistical modeling of temporal movement patterns
- Comparative analysis between different cohorts and time points
- 📊 Complete functional data analysis pipeline
- 📈 Advanced visualization with publication-ready plots
- 🔬 Statistical modeling using Partial Least Squares Analysis
- 📱 Jupyter notebook interface for interactive analysis
- 🔄 Reproducible research workflow
- 📋 Support for both arm curl and knock movement data
- Python 3.7 or higher
- Jupyter Notebook or JupyterLab
# Clone the repository
git clone https://github.com/yourusername/u-extend.git
cd u-extend
# Install required packages
pip install fdasrsf seaborn statsmodels numpy pandas matplotlib scipy
# Create a new conda environment
conda create -n uextend python=3.8
conda activate uextend
# Install packages
conda install -c conda-forge fdasrsf seaborn statsmodels numpy pandas matplotlib scipy jupyter
-
Launch Jupyter Notebook
jupyter notebook paper_codes.ipynb
-
Run the Analysis
- Execute all cells to reproduce arm curl results
- Modify data paths for knock data analysis
- View generated plots and statistical outputs
- Full data is available upon request
File | Description | Format | Example |
---|---|---|---|
ys_* |
Time series gyroscope measurements | Numeric array | Movement trajectories |
pids_* |
Participant identifiers | Numeric array | [1, 2, 3, 4, ...] |
visits_* |
Visit dates | Datetime array | ['7/30/24', '6/3/24', ...] |
cohorts_* |
Group assignments | String array | ['Control', 'DMD', ...] |
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from fdasrsf import *
# Load data
ys = np.loadtxt('ys_curl_wodelta.txt')
pids = np.loadtxt('pids_curl_wodelta.txt')
visits = np.loadtxt('visits_curl_wodelta.txt', dtype=str)
cohorts = np.loadtxt('cohorts_new.txt', dtype=str)
# Run analysis pipeline
# [Analysis code follows...]
- Arm Curl Analysis: Run
paper_codes.ipynb
as-is - Knock Data Analysis:
- Update file paths to knock data files
- Follow same analysis pipeline
- Compare results across movement types
The analysis generates:
- 📈 Functional trajectories showing movement patterns
- 📉 Mean functions for different groups and visits
- 🔍 Statistical comparisons between cohorts and time points
- 📋 Model summaries with parameter estimates and significance tests
- 🎨 Publication-ready visualizations using seaborn styling