design_matrix.polynomial: Create polynomial design matrix H

Description Usage Arguments Value See Also Examples

Description

design_matrix.polynomial creates a design matrix H using polynomial basis functions of degree M.

Usage

1
2
## S3 method for class 'polynomial'
design_matrix(x, obs, ...)

Arguments

x

A basis object.

obs

A vector of observations.

...

Additional parameters

Value

A list containing the design matrix H and the basis object. The dimensions of the matrix H are N x (M+1), where N is the length of the observations, and M is the degree of the polynomial.

See Also

design_matrix, polynomial_basis

Examples

1
2
3
obj <- polynomial.object(M=2)
obs <- c(0,.2,.5)
des_mat <- design_matrix(obj, obs)

andreaskapou/mpgex documentation built on May 12, 2019, 3:33 a.m.