spec_regress: Fisher Scoring Algorithm For Estimating Cepstral Coefficients

View source: R/cepstral.R

spec_regressR Documentation

Fisher Scoring Algorithm For Estimating Cepstral Coefficients

Description

Estimates replicate-specific cepstral coefficients and corresponding smoothed log-spectra using a Whittle likelihood approximation.

Usage

spec_regress(perd, psi, Wmat, k0)

Arguments

perd

An N x K matrix of periodogram.

psi

A matrix of cepstral basis functions of dimension k0 × K.

Wmat

The inverse Gram matrix of the basis functions.

k0

Number of cepstral basis function

Value

A list with:

f

An N × k0 matrix of estimated cepstral coefficients.

ff

An N × K matrix of smoothed log-spectra.

Examples

set.seed(123)
N <- 5
len <- 20
L <- floor(len/2) - 1
frq <- (1:L) / len

Y <- matrix(rnorm(len * N), nrow = len, ncol = N)

perd <- perd_get(Y)

k0 <- 3
psi <- psi_get(k0, frq)

Wmatin <- matrix(0, k0, k0)
for (j in 1:ncol(psi)) {
  Wmatin <- Wmatin + psi[, j] %*% t(psi[, j])
}
Wmat <- solve(Wmatin)

out <- spec_regress(perd, psi, Wmat, k0)

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

Related to spec_regress in CepReg...