Skip to contents

Produce model matrices for a generalized polynomial smooth from the model matrices for the marginal bases of the smooth.

Usage

glp.model.matrix(X)

Arguments

X

a list of model matrices for the marginal bases of a smooth

Details

This function computes a generalized polynomial where the orders of each term entering the polynomial may vary.

Value

A model matrix for a generalized polynomial smooth.

References

Hall, P. and J.S. Racine (2015), “Infinite Order Cross-Validated Local Polynomial Regression,” Journal of Econometrics, 185, 510-525.

Author

Jeffrey S. Racine racinej@mcmaster.ca

Examples

X <- list(matrix(1:4,2,2),matrix(5:10,2,3))
glp.model.matrix(X)
#>      [,1] [,2] [,3] [,4] [,5] [,6] [,7]
#> [1,]    1    3    5    5    7    7    9
#> [2,]    2    4    6   12    8   16   10