TPSbits

TPSbits

TPSbits creates structures to enable ASReml-R to fit the 2D tensor-product splines of Rodriguez-Alvarez et al (2018, Spatial Statistics 23, 52-71). It also enables extraction and plotting of the components of the splines, and includes the following functions:

  • bbasis: creates B-spline bases.
  • tpsmmb: creates design matrices and vectors for 2d tp-splines to go into mbf or grp constructs.
  • edf: calculates EDF for random terms in a model (WARNING: requires scaled identity variance models).
  • tpsfitted: extracts components of fitted spline.
  • tpsurface: plots surfaces as contour or tile plots.
  • csteps: calculates nice intervals for contour plots.

The package can be installed in R from a local archive in the usual way, either after downloading the respective file or pasting in the URL. There are two example scripts to illustrate usage: