View source: R/coding_function.R
coding_function | R Documentation |
This function creates functions (closures) that implement a flexible coding matrix for a factor.
coding_function(
x,
levs = levels(as.factor(x)),
intercept = rbind(c(1, rep(0, length(levs) - 1))),
constraints = NULL,
estimates = diag(length(levs))[-1, , drop = FALSE],
tolerance = 1e-16,
debug = FALSE
)
The coding function can be designed with specified constraints and specified estimated model parameters.
The coding function can also be used to generate portions of hypothesis matrices to estimate interpretable functions of parameters.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.