Usage
srf(coords, K = min(50, sum(nd)/4), rankZ = 0.999,
centerBase = TRUE, baseType = c("B", "thinPlate"),
decomposition = c("ortho", "MM", "asIs"), tol = 1e-10)
Arguments
coords
a data.frame
with two columns
containing the coordinates
K
(approximate) number of basis functions in the
original basis (defaults to 50). If baseType="B"
you can specify a vector giving the number of marginal
basis functions in each direction.
rankZ
how many eigenvectors to retain from the
eigen decomposition: either a number > 3 or the
proportion of the sum of eigenvalues the retained
eigenvectors must represent at least. Defaults to .999.
centerBase
project the basis of the penalized part
into the complement of the column space of the basis of
the unpenalized part? defaults to TRUE
baseType
Defaults to "B"
, i.e. a tensor
product basis based on marginal cubic B-splines with
ridge penalty (i.e. penalizing deviations from the
constant). Set to "thinPlate"
if cubic thin plate
splines are desired, see note be
decomposition
use a (truncated) spectral
decomposition of the implied prior covariance of
$f(x,y)$ for a low rank representation with
orthogonal basis functions and i.i.d. coefficients
("ortho"
), or use the mixed model
reparameterization for
tol
count eigenvalues smaller than this as zero