mogavsToLinear {mogavs} | R Documentation |
Transform a mogavs model into a linear model.
Description
Takes in a mogavs model and a number of variables, and transforms that into linear model as in lm
.
Usage
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 |
Author(s)
Tommi Pajala <tommi.pajala@aalto.fi>
See Also
Examples
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)
[Package mogavs version 1.1.0 Index]