Commit 17dc0c4a authored by Felix Fauer's avatar Felix Fauer
Browse files

sort order of init values

parent e88d98b3
......@@ -116,7 +116,7 @@ gev.d.fit<-
}else{init.vals = as.list(init.vals)}
if(length(init.vals)!=init.necessary.length | !is.list(init.vals)) {
warning(paste0('Parameter init.vals is not used, because it is no list of length ',init.necessary.length,'.'))
print(paste0('Parameter init.vals is not used, because it is no list of length ',init.necessary.length,'.'))
init.vals <- gev.d.init(xdat,ds,z$link)
}else{ # length of given values is correct
......@@ -132,6 +132,9 @@ gev.d.fit<-
if (theta_zero) init.vals$theta = 0
if (eta2_zero) init.vals$eta2 = init.vals$eta
if (tau_zero) init.vals$tau = 0
init.vals=init.vals[c("mu","sigma","xi","theta","eta","eta2","tau")]
iv=init.vals
init.vals = list(mu=iv$mu,sigma=iv$sigma,xi=iv$xi,theta=iv$theta,eta=iv$eta,eta2=iv$eta2,tau=iv$tau)
if(!any(is.na(init.vals))){ #all initial values are given
# do nothing
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment