Learn R Programming

autoFRK (version 1.3.2)

mrts: Multi-Resolution Thin-plate Spline Basis Functions

Description

This function generates multi-resolution thin-plate spline basis functions. The basis functions are (descendingly) ordered in terms of their degrees of smoothness with a higher-order function corresponding to larger-scale features and a lower-order one corresponding to smaller-scale details. They are useful in the spatio-temporal random effects model.

Usage

mrts(knot, k, x = NULL, maxknot = 5000)

Arguments

knot

m by d matrix (d<=3) for m locations of d-dimensional knots as in ordinary splines. Missing values are not allowed.

k

the number (<=m) of basis functions.

x

n by d matrix of coordinates corresponding to n locations where the values of basis functions to be evaluated. Default is NULL, which uses the m by d matrix in knot.

maxknot

maximum number of knots to be used in generating basis functions. If maxknot < m, a deterministic subset selection of knots will be used. For using all knots, set maxknot>=m.

Value

An mrts object is generated. If x=NULL (default) it returns an m by k matrix of k basis function taken values at knots. With x given, it returns n by k matrix for basis functions taken values at x.

References

Tzeng, S., & Huang, H. C. (2018). Resolution Adaptive Fixed Rank Kriging. Technometrics, https://doi.org/10.1080/00401706.2017.1345701.

See Also

predict.mrts

Examples

Run this code
# NOT RUN {
knot=seq(0,1,l=30)
b=mrts(knot,30)
x0=seq(0,1,l=200)
bx=predict(b,x0) 
par(mfrow=c(5,6),mar=c(0,0,0,0))
for(i in 1:30) { plot(bx[,i],type="l",axes=FALSE); box()}
# }

Run the code above in your browser using DataLab