R/coef_intsearch.R

Defines functions coef.sum.intsearch

Documented in coef.sum.intsearch

###########################################################################################################
coef.sum.intsearch<-function(object,...){
  # get coef for a object from fit object after running interval search 
   
  f1 <- object$cvreg
  res<-f1$glmnet.fit
  cof <- as.vector(coef(res, s=object$lambda))
  names.cof <- rownames(res$beta)
  cofn <- cof[which(cof != 0)]
  names(cofn) <- names.cof[which(cof != 0)] 
  bet <- res$beta[match(names(cofn), rownames(res$beta)),]
  
  return(cofn) 
}  

Try the c060 package in your browser

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

c060 documentation built on May 30, 2017, 3:06 a.m.