Apply SpatPCA to Capture the Dominant Spatial Pattern with One-Dimensional Locations
In this tutorial, we explore the application of SpatPCA to capture the most dominant spatial patterns in one-dimensional data, highlighting its performance under varying signal-to-noise ratios.
Basic Settings
Used Packages
True Spatial Pattern (Eigenfunction)
The underlying spatial pattern exhibits significant variation at the center and remains nearly unchanged at both ends of the curve.
Case I: Higher Signal of the True Eigenfunction
Generate Realizations
We generate 100 random samples based on a spatial signal with a standard deviation of 20 and standard normal distribution for noise.
Animate Realizations
Simulated central realizations exhibit a wider range of variation than others.
Apply SpatPCA::spatpca
Compare SpatPCA with PCA
Comparison reveals that SpatPCA provides sparser patterns than PCA, closely resembling the true eigenfunction.
Case II: Lower Signal of the True Eigenfunction
Generate Realizations with $\sigma=3$
Animate Realizations
Simulated samples show a less clear spatial pattern.
Compare Resultant Patterns
SpatPCA outperforms PCA visually when the signal-to-noise ratio is lower.
Summary
In this article, we explore the application of the SpatPCA R package to capture dominant spatial patterns in one-dimensional data. The tutorial focuses on demonstrating SpatPCA’s performance under different signal-to-noise ratios. Two cases are considered: one with a higher signal and another with a lower signal. Animated realizations and comparisons with traditional PCA illustrate SpatPCA’s ability to provide sparser and more accurate patterns, particularly in scenarios with lower signal-to-noise ratios.