eval_functions {BPRMeth} | R Documentation

## Evaluate basis functions

### Description

Method for evaluating an M basis function model with observation data `obs` and coefficients `w`.

### Usage

    eval_probit_function(obj, ...)

    eval_function(obj, ...)

    ## S3 method for class 'rbf'
    eval_function(obj, obs, w, ...)

    ## S3 method for class 'polynomial'
    eval_function(obj, obs, w, ...)

    ## S3 method for class 'fourier'
    eval_function(obj, obs, w, ...)

### Arguments

`obj` | The basis function object.
`...` | Optional additional parameters
`obs` | Observation data.
`w` | Vector of length M, containing the coefficients of an M^{th}-order basis function.

### Value

The evaluated function values.

NOTE that the `eval_probit_function` computes the probit transformed basis function values.

### Author(s)

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

### See Also

`create_basis`, `design_matrix`

### Examples

    # Evaluate the probit transformed basis function values
    obj <- create_rbf_object(M=2)
    obs <- c(1,2,3)
    w <- c(0.1, 0.3, -0.6)
    out <- eval_probit_function(obj, obs, w)

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

    # Evaluate the RBF basis function values
    obj <- create_rbf_object(M=2, mus = c(2,2.5))
    obs <- c(1,2,3)
    w <- c(0.1, 0.3, -0.6)
    out <- eval_function(obj, obs, w)

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

    # Evaluate the Polynomial basis function values
    obj <- create_polynomial_object(M=2)
    obs <- c(1,2,3)
    w <- c(0.1, 0.3, -0.6)
    out <- eval_function(obj, obs, w)

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

    # Evaluate the Fourier basis function values
    obj <- create_fourier_object(M=2)
    obs <- c(1,2,3)
    w <- c(0.1, 0.3, -0.6)
    out <- eval_function(obj, obs, w)

[Package BPRMeth version 1.6.0 Index]