Learn R Programming


output: github_document

smile

Spatial Misalignment: Interpolation, Linkage, and Estimation

The smile package for R simplifies the analysis of spatial data. It offers tools to:

  • Estimate and predicte: Using a model-based approach, smile treats areal data as averages derived from a continuous Gaussian random field. It is possible to model point-referenced and areal data jointly.

  • Interpolate: For straightforward interpolation, smile employs a non-parametric method known as simple areal interpolation.

  • Quantify uncertainty: When dealing with simple areal interpolation and knowing the variance of your observations, smile helps you quantify the uncertainty associated with the interpolation.

Essentially, smile provides a user-friendly way to explore, model, and interpolate spatial data with R, offering both model-based and non-parametric approaches.

The package accompanies a web page (powered by pkgdown) and 5 vignettes.

Vignettes

  1. Converting sf to spm objects;
  2. Fitting models and making predictions;
  3. Areal Interpolation;
  4. Method;
  5. Spatial covariance functions;

Installation

To install the CRAN version of the package, use

install.packages("smile")

The installation of the development version from GitHub can be done via

remotes::install_github("lcgodoy/smile")
## or devtools::install_github("lcgodoy/smile")

Copy Link

Version

Install

install.packages('smile')

Monthly Downloads

166

Version

1.1.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Lucas da Cunha Godoy

Last Published

September 22nd, 2025

Functions in smile (1.1.0)

single_pexp

Powered Exponential covariance function (scalar)
nl_ct

Nova Lima census tracts
singl_log_lik_nn

Evaluate log-lik
singl_log_plik

Evaluate log-lik
single_spher

Spherical covariance function (scalar)
single_exp

Matern covariance function (scalar - generic)
single_cs

Cubic spline covariance function (scalar)
predict_spm

Prediction over the same or a different set of regions (or points).
vor_build

Voronoi Tessellation inside a polygon
smile

smile: Spatial MIsaLignment Estimation
weight_mat

Building weight matrix W for Areal Interpolation
st_remove_holes

Remove holes from a sfc POLYGON
vdl_var

Voronoi Data Linkage - Single variable and variance
summary_spm_fit

Summarizing spm_fit
vdl

Voronoi Data Linkage
transform.sf

Transform method for sf objects
aux_mat

Pairwise distances for a list of matrices (Internal use)
goodness_of_fit

Akaike's (and Bayesian) An Information Criterion for spm_fit objects.
AI

Areal Interpolation
find_phi

Find phi parameter for the Exponential spatial auto-correlation function
fit_spm

Fitting an underlying continuous process to areal data
sev_pexp

Calculate Smallest Eigenvalue for Power Exponential Correlation Matrices
crossdist

Pairwise distances between two matrices (Eigen version)
est_mle

MLEs for fixed V.
single_gw0

Matern Generalized Wendland (GW) covariance function (scalar - generic)
aggregate_aux

Internal use only
distmat

Creating a symmetric distance matrix (Eigen version)
liv_lsoa

Liverpool Lower Super Output Area.
singl_log_lik

Evaluate log-lik
sf_to_spm

single sf to spm
morans_i

Calculates the (global) Moran's I
mat_cov

Matern covariance function for a given distance matrix.
singl_ll_nn_hess

Evaluate log-lik
liv_msoa

Liverpool Middle Super Output Area.