Description Usage Arguments Value Author(s) See Also Examples
View source: R/design_matrix.R
These functions call the appropriate methods depending on the
class of the object obj
to create RBF, polynomial or Fourier design
matrices.
1 2 3 4 5 6 7 8 9 10 11 12 13 | design_matrix(obj, ...)
## Default S3 method:
design_matrix(obj, ...)
## S3 method for class 'polynomial'
design_matrix(obj, obs, ...)
## S3 method for class 'rbf'
design_matrix(obj, obs, ...)
## S3 method for class 'fourier'
design_matrix(obj, obs, ...)
|
obj |
A basis function object. |
... |
Additional parameters. |
obs |
A vector of observations. |
A design matrix object
C.A.Kapourani C.A.Kapourani@ed.ac.uk
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | obj <- create_polynomial_object(M=2)
obs <- c(0,.2,.5)
poly <- design_matrix(obj, obs)
#----------------
obj <- create_rbf_object(M=2)
obs <- c(0,.2,.5)
rbf <- design_matrix(obj, obs)
#----------------
obj <- create_fourier_object(M=2)
obs <- c(0,.2,.5)
fourier <- design_matrix(obj, obs)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.