ols_get: Ordinary Least Squares Estimator for Log-Spectral Regression

View source: R/cepstral.R

ols_getR Documentation

Ordinary Least Squares Estimator for Log-Spectral Regression

Description

Performs OLS regression to estimate the association between covariates and cepstral coefficients.

Usage

ols_get(X, f, frq, nbase)

Arguments

X

A numeric matrix of predictors (N x P).

f

A numeric matrix of cepstral coefficients.

frq

A vector of frequencies in [0,1].

nbase

Number of Fourier basis functions.

Value

A list containing:

alph

Intercept vector.

bet

OLS coefficient matrix.

spechat

Estimated smoothed log-spectra.

res

Matrix of residuals.

Examples

frq <- seq(0, 1, length.out = 16)[2:8]
n <- 10
p <- 3
nbase <- 5
X <- matrix(rnorm(n * p), n, p)
f <- matrix(rnorm(n * nbase), n, nbase)

ols_result <- ols_get(X, f, frq, nbase)


CepReg documentation built on Sept. 10, 2025, 10:38 a.m.

Related to ols_get in CepReg...