Learn R Programming

limorhyde (version 1.0.3)

getCosinorBasis: Basis matrix for cosinor

Description

Generate basis matrix for cosinor regression.

Usage

getCosinorBasis(x, period, intercept)

Value

A matrix with a row for each value of x and a column for each component of the decomposition.

Arguments

x

Values of the predictor variable.

period

Period for the predictor variable.

intercept

If TRUE, a column of ones will be included in the basis.

Examples

Run this code
b = getCosinorBasis(seq(0, 20, 4), period = 24, intercept = FALSE)

Run the code above in your browser using DataLab