mut_func: Model Mutation

Description Usage Arguments Value Examples

View source: R/mut_func.R

Description

Mutates both the variables included and the model structure. Internal use only.

Usage

1
mut_func(mutation_row, Kvar, Kint, pm, pint, pnonpar, pintnonpar, regressors)

Arguments

mutation_row

Vector containing a model.

Kvar

Maximum number of variables allowed in the final model

Kint

Maximum number of interactions allowed in the final model

pm

Mutation rate for variables.

pint

Mutation rate for interactions of variables.

pnonpar

Mutation rate for model structure of main terms.

pintnonpar

Mutation rate for model structure of interaction terms.

regressors

Total number of variables considered.

Value

Vector containing the mutated model.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
mutation_row <- c("x1","0","x4","x3","0","x8","1","0","0","0","0","1")
Kvar <- 10
Kint <- 0
pm <- 0.05
pint <- 0.1
pnonpar <- 0.1
pintnonpar <- 0.1
regressors <- 20

## Not run: 
mut_func(mutation_row,Kvar,Kint,pm,pint,pnonpar,pintnonpar,regressors)

## End(Not run)

markcus1/gagam documentation built on April 16, 2020, 11:50 a.m.