tef_gaussRBF: From a numeric vector, get a set of weight vectors...

View source: R/tef_gaussRBF.R

tef_gaussRBFR Documentation

From a numeric vector, get a set of weight vectors corresponding to normalized Gaussian radial basis functions

Description

deprecated. Please refer to time_basisFun_mem, time_basisFun_formula, and time_basisFun_df. Given a numeric vector (e.g., time points) and the number of quantiles to divide it into (e.g., quartiles), define a set of weight vectors. In the case of quartiles, for example, the most weight for the vectors is centered on the the 0, .25, .5, .75, and 1 quantiles of the input vector. In addition, two extra weight vectors are included that extrapolate beyond the original data (in this case, they would be the "-.25 quantile" and the "1.25 quantile"). The weight vectors are calculated using a Gaussian radial basis function (https://en.wikipedia.org/wiki/Radial_basis_function), with a width approximately defined to have the values with half the maximum weight of the vector be half of the inter-peak width. After the basis functions are defined, they are normalized for every value of the original vectors (i.e., weight_i/sum(weights)).

Usage

tef_gaussRBF(x, quantiles = 4)

Arguments

x

numeric vector, e.g., time points

quantiles

Examples

tim <- 1:200
tim_RBFs <- tef_gaussRBF(tim)
pairs(tim_RBFs)


akcochrane/TEfits documentation built on June 12, 2025, 11:10 a.m.