powered by
Performs OLS regression to estimate the association between covariates and cepstral coefficients.
ols_get(X, f, frq, nbase)
A list containing:
alph
Intercept vector.
bet
OLS coefficient matrix.
spechat
Estimated smoothed log-spectra.
res
Matrix of residuals.
A numeric matrix of predictors (N x P).
A numeric matrix of cepstral coefficients.
A vector of frequencies in [0,1].
[0,1]
Number of Fourier basis functions.
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)
Run the code above in your browser using DataLab