design_matrix.polynomial: Create polynomial design matrix H

Description Usage Arguments Value See Also Examples

View source: R/design_matrix.R

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 Nov. 25, 2017, 8:08 a.m.