Usage
sm(x, K=min(length(unique(x)), 20), spline.degree=3, diff.ord=2,
rankZ=0.999, centerBase=T, centerx=x,
decomposition=c("ortho", "MM", "asIs"), tol=1e-10)
Arguments
K
number of basis functions in the original basis (defaults to 20)
spline.degree
defaults to 3 for cubic B-plines
diff.ord
order of the difference penalty, defaults to 2 for penalizing deviations from linearity
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
centerx
vector of x-values used for centering (defaults to x
)
decomposition
use a truncated spectral decomposition of the implied prior covariance of $f(x)$ for a low rank representation
with orthogonal
basis functions and i.i.d. coefficients ("ortho"
), or use the mixed model reparameterization for
non-orthogo
tol
count eigenvalues smaller than this as zero