R/coef.qut.R

Defines functions coef.qut

Documented in coef.qut

coef.qut <- 
function(object, mode='glm',...){
	if(mode=='lasso') return(object$beta)
	else if(class(object$betaglm)=='try-error'){
		warning('GLM did not converged, returning LASSO coefficients')
		return(object$beta)
	}
	else{
		if((!attr(object$betaglm,'converged'))){
			warning('GLM did not converged, returning LASSO coefficients')
			return(object$beta)
		}
		else return(object$betaglm)
	}
}

Try the qut package in your browser

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

qut documentation built on Jan. 19, 2021, 5:09 p.m.