SpatPCA Package
Description
SpatPCA is an R package that facilitates regularized principal component analysis,
- seeking the dominant patterns (eigenfunctions), which can be smooth and localized
- computing spatial prediction (Kriging) at new locations
- suitable for either regularly or irregularly spaced data, including 1D, 2D, and 3D
- by the alternating direction method of multipliers (ADMM) algorithm
Installation
To get the current released version from CRAN:
install.packages("SpatPCA")To get the current development version from GitHub:
devtools::install_github("egpivo/SpatPCA")To compile C++ code with the package RcppArmadillo,
- Windows users require Rtools
- Mac users require Xcode Command Line Tools, and install the library gfortran by typing the following lines into terminal
curl -O http://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2
sudo tar fvxz gfortran-4.8.2-darwin13.tar.bz2 -C /
More details can be found here.
Usage
library(SpatPCA)
spatpca(position, realizations)- Input: realizations with the corresponding position
- Output: return the most dominant eigenfunctions automatically.
- More details can be referred to Demo
Author
Wen-Ting Wang and Hsin-Cheng Huang
Maintainer
Reference
Wang, W.-T. and Huang, H.-C. (2017). Regularized principal component analysis for spatial data. Journal of Computational and Graphical Statistics, 26, 14-25.
License
GPL-3