marginal.matrices.tesmi1.ps: Constructs marginal model matrices for "tesmi1" and "tesmd1"...

View source: R/bivar.smooth.const.R View source: R/bivar.smooth.const.R

marginal.matrices.tesmi1.psR Documentation

Constructs marginal model matrices for "tesmi1" and "tesmd1" bivariate smooths in case of B-splines basis functions for both unconstrained marginal smooths

Description

This function returns the marginal model matrices and the list of penalty matrices for the tensor product bivariate smooth with the single monotone increasing or decreasing restriction along the first covariate. The marginal smooth functions of both covariates are constructed using the B-spline basis functions.

Usage

marginal.matrices.tesmi1.ps(x, z, xk, zk, m, q1, q2)

Arguments

x

A numeric vector of the values of the first covariate at which to evaluate the B-spline marginal functions. The values in x must be between xk[m[1]+2] and xk[length(xk) - m[1] - 1].

z

A numeric vector of the values of the second covariate at which to evaluate the B-spline marginal functions. The values in z must be between zk[m[2]+2] and zk[length(zk) - m[2] - 1].

xk

A numeric vector of knot positions for the first covariate, x, with non-decreasing values.

zk

A numeric vector of knot positions for the second covariate,z, with non-decreasing values.

m

A pair of two numbers where m[i]+1 denotes the order of the basis of the i^{th} marginal smooth (e.g. m[i] = 2 for a cubic spline.)

q1

A number denoting the basis dimension of the first marginal smooth.

q2

A number denoting the basis dimension of the second marginal smooth.

Details

The function is not called directly, but is rather used internally by the constructor

smooth.construct.tesmi1.smooth.spec and smooth.construct.tesmd1.smooth.spec .

Value

X1

Marginal model matrix for the first monotonic marginal smooth.

X2

Marginal model matrix for the second unconstrained marginal smooth.

S

A list of penalty matrices for this tensor product smooth.

Author(s)

Natalya Pya <nat.pya@gmail.com>

References

Pya, N. and Wood, S.N. (2015) Shape constrained additive models. Statistics and Computing, 25(3), 543-559

Pya, N. (2010) Additive models with shape constraints. PhD thesis. University of Bath. Department of Mathematical Sciences

Wood S.N. (2006) Generalized Additive Models: An Introduction with R. Chapman and Hall/CRC Press.

See Also

smooth.construct.tesmi1.smooth.spec, smooth.construct.tesmi2.smooth.spec,

marginal.matrices.tesmi2.ps, smooth.construct.tesmd1.smooth.spec,

smooth.construct.tesmd2.smooth.spec


scam documentation built on June 22, 2024, 10:43 a.m.