R/jerr.coxnet.R

Defines functions jerr.coxnet

Documented in jerr.coxnet

jerr.coxnet=function(n,maxit,pmax){

  if(n>0){#fatal error
    outlist=jerr.elnet(n)
    if(outlist$msg!="Unknown error")return(outlist)
    if(n==8888)msg="All observations censored - cannot proceed"  
    else if(n==9999)msg="No positive observation weights"
    else if(match(n,c(20000,30000),FALSE)) msg="Inititialization numerical error; probably too many censored observations"
    else 	 msg="Unknown error"
    list(n=n,fatal=TRUE,msg=msg)
  } else if(n<0){ # non-fatal error
    if(n<= -30000){
      msg=paste("Numerical error at ",-n-30000,"th lambda value; solutions for larger values of lambda returned",sep="")
      list(n=n,fatal=FALSE,msg=msg)
    }
    else
      jerr.elnet(n,maxit,pmax)
  }
}

Try the glmnet package in your browser

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

glmnet documentation built on Aug. 22, 2023, 9:12 a.m.