| apply_kernel | R Documentation |
This function extracts the appropriate trend, and applies its implied kernel
using either the pure R implementation or the Rcpp version.
When mode = "compare", the function checks whether the
two implementations produce identical output.
apply_kernel(
kernel_pars,
emc,
subject = 1,
input_pars = NULL,
trend_n = 1,
mode = "Rcpp"
)
kernel_pars |
A named vector of kernel parameters on the natural scale.
Use |
emc |
An |
subject |
Subject index for which to apply the kernel. Defaults to |
input_pars |
Optional parameter matrix containing externally supplied parameter values (e.g., trend parameters). Only needed for custom kernels. |
trend_n |
Integer specifying which trend to apply when multiple trends
exist in the model. Defaults to |
mode |
Character string specifying which implementation to use:
|
Applies the trend-specific kernel associated with an emc model to the
a subject's data and returns the resulting kernel matrix.
Returns a kernel matrix produced by the corresponding implementation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.