R/get_lambda.R

Defines functions get_lambda

Documented in get_lambda

get_lambda <- function(zero_range, coefs, eigens, rhos, neBsc, q){
    eps <- .Machine$double.eps
    aux <- try(uniroot(Elambda, zero_range, coefs = coefs, eigens = eigens, rhos = rhos, neBsc = neBsc, q = q, tol = eps, maxiter = 10^5, extendInt = "yes")$root)
    if(inherits(aux,"try-error")){
        out <- 5; message("Warning: non-optimal smoothing parameter.")
    }else{
        out <- aux}
    out
}

Try the eBsc package in your browser

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

eBsc documentation built on May 31, 2023, 5:40 p.m.