mogavsToLinear: Transform a mogavs model into a linear model.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/mogavsToLinear.R

Description

Takes in a mogavs model and a number of variables, and transforms that into linear model as in lm.

Usage

1
mogavsToLinear(bestModel, y_ind, data, ...)

Arguments

bestModel

A binary vector, representing the variables in one model for a given number of variables.

y_ind

Column number for the y values in data.

data

The used data set.

...

Additional arguments.

Value

lm

A linear model of class lm.

Author(s)

Tommi Pajala <tommi.pajala@aalto.fi>

See Also

getBestModel,getBestModelVars

Examples

1
2
3
4
5
6
7
8
data(sampleData)
mod<-mogavs(y~.,sampleData,maxGenerations=20)

#get the best model with 15 variables
bm<-getBestModel(mod,15,method=NULL)

#transform best model into a linear model
mogavsToLinear(bm,1,sampleData)

mogavs documentation built on May 2, 2019, 1 a.m.