Package: spifa 0.1.0

Erick A. Chacón-Montalván

spifa: Bayesian Spatial Item Factor Analysis

Fits spatial item factor analysis models for binary responses, following Chacón-Montalván, E. A., Parry, L., Giorgi, E., Torres, P., Orellana, J. D. Y., Moraga, P., and Taylor, B. M. (2025) <doi:10.1214/25-AOAS2072>, using full Bayesian inference via adaptive Metropolis-Hastings within Gibbs sampling and auxiliary variables with a probit link function. The latent factors are modelled as the sum of a predictor effect, a multivariate Gaussian process capturing spatial dependence, and a multivariate non-spatial term, allowing users to fit and predict spatially-referenced constructs such as food insecurity or socioeconomic indices. Standard exploratory and confirmatory item factor analysis are supported as particular cases, simply by dropping the spatial structure.

Authors:Erick A. Chacón-Montalván [aut, cre], Emanuele Giorgi [ctb], Benjamin M. Taylor [ctb]

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

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

Bug tracker:https://github.com/erickchacon/spifa/issues

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

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:
  • ipixuna - Simulated Food Insecurity Survey Data for Ipixuna

On CRAN:

Conda:

openblascppopenmp

4.18 score 61 scripts 6 exports 52 dependencies

Last updated from:68e38b172e. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK162
linux-devel-x86_64OK219
source / vignettesOK456
linux-release-x86_64OK210
windows-devel-arm64OK300
windows-devel-x86_64OK193
windows-release-arm64OK289
windows-release-x86_64OK204
wasm-releaseOK165

Exports:dicplot_densityplot_intervalplot_predictplot_tracespifa

Dependencies:abindbackportscheckmateclassclassIntclicpp11DBIdistributionaldplyre1071farvergenericsggplot2ggridgesgluegtableisobandKernSmoothlabelinglifecyclemagrittrmatrixStatsnumDerivpatchworkpillarpkgconfigposteriorproxypurrrR6RColorBrewerRcppRcppArmadilloRcppTNrlangs2S7scalessfstringistringrtensorAtibbletidyrtidyselectunitsutf8vctrsviridisLitewithrwk

Advanced features
Restrictions and priors | constraints | priors | Fit with constraints and priors | Continue sampling | Compare models with DIC

Last update: 2026-10-22
Started: 2026-10-22

Bayesian Spatial Item Factor Analysis
Introduction | Ipixuna data | Sample from the posterior | Restrictions | Priors | Sampling | Summarise and visualize samples | Summary | Plot | Plotting functions | Trace plots | Density plots | Interval plots | Predict the latent factors | Observed locations | New locations | References

Last update: 2026-10-22
Started: 2026-10-22

Data preparation
Simulating a raw questionnaire | Data for spifa() | Missing values | Missing item responses | Missing predictor values

Last update: 2026-10-22
Started: 2026-10-22

Integrated workflow
Step 1: Discrimination structure with mirt | Step 2: Spatial range with gstat | Estimate the latent factors | Evaluate predictors effects | Evaluate the spatial structure | Step 3: Spatial modelling with spifa | Visualize | Predict

Last update: 2026-10-22
Started: 2026-10-22

Model types
Exploratory item factor analysis (EIFA) | Confirmatory item factor analysis (CIFA) | CIFA model with predictors | Spatial item factor analysis (SPIFA) | SPIFA model with predictors

Last update: 2026-10-22
Started: 2026-10-22