design_matrix: Generic function for creating design matrices

Description Usage Arguments Value Author(s) See Also Examples

Description

These functions call the appropriate methods depending on the class of the object x to create RBF, polynomial or Fourier design matrices.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
design_matrix(x, ...)

## Default S3 method:
design_matrix(x, ...)

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

## S3 method for class 'rbf'
design_matrix(x, obs, ...)

## S3 method for class 'fourier'
design_matrix(x, obs, ...)

Arguments

x

A basis function object.

...

Additional parameters.

obs

A vector of observations.

Value

A design matrix object

Author(s)

C.A.Kapourani C.A.Kapourani@ed.ac.uk

See Also

create_polynomial_object, create_rbf_object, create_fourier_object

Examples

1
2
3
4
5
6
7
8
9
obj <- create_polynomial_object(M=2)
obs <- c(0,.2,.5)
polyn <- design_matrix(obj, obs)

#----------------

obj <- create_rbf_object(M=2)
obs <- c(0,.2,.5)
rbf <- design_matrix(obj, obs)

andreaskapou/BPRMeth-devel documentation built on May 12, 2019, 3:32 a.m.