getCosinorBasis: Basis matrix for cosinor

View source: R/limorhyde.R

getCosinorBasisR Documentation

Basis matrix for cosinor

Description

Generate basis matrix for cosinor regression.

Usage

getCosinorBasis(x, period, intercept)

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.

Value

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

Examples

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


hugheylab/limorhyde documentation built on Dec. 6, 2022, 1:53 a.m.