Learn R Programming

CepReg (version 0.1.3)

effect_get: Compute Functional Effects of Intercept and Covariates

Description

Projects cepstral coefficient intercept and covariate effects onto the frequency domain using the cepstral basis functions.

Usage

effect_get(alpha, beta, frq, nbase, ind)

Value

A list containing:

alpha_effect

Functional intercept across frequency.

beta_effect

Matrix of functional covariate effects.

Arguments

alpha

A numeric vector of cepstral intercept coefficients.

beta

A numeric matrix of regression coefficients.

frq

Numeric vector of frequency points in [0,1].

nbase

Number of Fourier basis functions.

ind

An integer vector indicating the indices of covariates to be included in the model.

Examples

Run this code
frq <- seq(0, 1, length.out = 16)[2:8]
alpha <- rnorm(3)
beta <- matrix(rnorm(2 * 3), 2, 3)
result <- effect_get(alpha, beta, frq, nbase = 3, ind = c(1, 2))

Run the code above in your browser using DataLab