expand_model | R Documentation |
Expand model given y
and x
variables.
expand_model(y, x, k)
y |
The Y variable. |
x |
The X variables. |
k |
Number of additive components. |
A char
vector containing the expanded models.
library(voice)
expand_model('y', LETTERS[1:4], 1)
expand_model('y', LETTERS[1:4], 2)
expand_model('y', LETTERS[1:4], 3)
expand_model('y', LETTERS[1:4], 4)
# multiple models using apply functions
nx <- 10 # number of X variables to be used
models <- lapply(1:nx, expand_model, y = 'y', x = LETTERS[1:nx])
names(models) <- 1:nx
models
sum(sapply(models, length)) # total of models
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.