R/flaremixEM.R

Defines functions flaremixEM

Documented in flaremixEM

flaremixEM<-function(y, x, lambda = NULL, beta = NULL, sigma = NULL, alpha = NULL, nu=NULL,
		epsilon = 1e-04, maxit = 10000, verb = FALSE, restart=50){
j=1
while(j<=length(nu)){
temp=try(try.flare(y=y, x=x, lambda = lambda, beta = beta, sigma = sigma, alpha = alpha, nu=nu[j],
		epsilon = epsilon, maxit = maxit, verb = verb, restart=restart),silent=TRUE)

if(any(class(temp)=="try-error")) j=j+1 else j=2^100
}



if(j==(length(nu)+1)) stop(paste("Too many attempts. Select a different barrier constant.","\n"))


temp

}

Try the mixtools package in your browser

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

mixtools documentation built on Dec. 5, 2022, 5:23 p.m.