create_bivariate_design {bayesGAM}R Documentation

Creates a design matrix from a bivariate smoothing algorithm

Description

create_bivariate_design accepts two numeric vectors of equal length as inputs. From these inputs, a bivariate smoothing design matrix is produced using thin plate splines.

Usage

create_bivariate_design(X1, X2, num_knots = NULL, knots = NULL)

Arguments

X1

numeric vector for first variable

X2

numeric vector for second variable

num_knots

optional: number of knots

knots

optional: matrix of knot locations for bivariate smoothing

Value

list containing the design matrix Z and matrix of knots

References

Ruppert, David, Matt P. Wand, and Raymond J. Carroll. Semiparametric Regression. No. 12. Cambridge university press, 2003. Section 13.5

Matt Wand (2018). SemiPar: Semiparametric Regression. R package version 1.0-4.2.

Examples

x1 <- rnorm(100)
x2 <- rnorm(100)
res <- create_bivariate_design(x1, x2)
res$knots
dim(res$Z)

[Package bayesGAM version 0.0.2 Index]