expand_model {voice}R Documentation

Expand model

Description

Expand model given y and x variables.

Usage

expand_model(y, x, k)

Arguments

y

The Y variable.

x

The X variables.

k

Number of additive components.

Value

A char vector containing the expanded models.

Examples

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

[Package voice version 0.4.21 Index]