DesignM: Computing Designmatrix for Splines

Description Usage Arguments Value Author(s) References

View source: R/utils_sdPrior.r

Description

This function computes the design matrix for Bayesian P-splines as it would be done in BayesX. The implementation currently on works properly for default values (knots=20, degree=3).

Usage

1
DesignM(x, degree = 3, m = 20, min_x = min(x), max_x = max(x))

Arguments

x

the covariate vector.

degree

of the B-splines, default is 3.

m

number of knots, default is 20.

min_x

the left interval boundary, default is min(x).

max_x

the right interval boundary, defalut is max(x).

Value

a list with design matrix at distinct covariates, design matrix at all observations, index of sorted observations, the difference matrix, precision matrix and the knots used.

Author(s)

Nadja Klein

References

Stefan Lang and Andy Brezger (2004). Bayesian P-Splines. Journal of Computational and Graphical Statistics, 13, 183–212.

Belitz, C., Brezger, A., Klein, N., Kneib, T., Lang, S., Umlauf, N. (2015): BayesX - Software for Bayesian inference in structured additive regression models. Version 3.0.1. Available from http://www.bayesx.org.


sdPrior documentation built on May 2, 2019, 8:57 a.m.

Related to DesignM in sdPrior...