Learn R Programming

bsamGP (version 1.2.6)

fs: Specify a Fourier Basis Fit in a BSAM Formula

Description

A symbolic wrapper to indicate a nonparametric term in a formula argument to bsaq, bsaqdpm, bsar, bsardpm, and gbsar.

Usage

fs(x)

Arguments

x

a vector of the univariate covariate for nonparametric component

Examples

Run this code
if (FALSE) {

# fit x using a Fourier basis
y ~ w + fs(x)

# fit x1 and x2 using a Fourier basis
y ~ fs(x1) + fs(x2)

}

Run the code above in your browser using DataLab