R/mogavsToLinear.R

Defines functions mogavsToLinear

Documented in mogavsToLinear

mogavsToLinear <-
function(bestModel,y_ind,data,...){
  f2<-as.formula(paste(colnames(data)[y_ind],"~",paste(colnames(data)[which(bestModel==1)+1],collapse="+"),sep=""))
  modlm<-do.call("lm",list(formula=substitute(f2),data=substitute(data),model=TRUE,x=TRUE,y=TRUE))

  return(modlm)
}

Try the mogavs package in your browser

Any scripts or data that you put into this service are public.

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