Skip to content

Commit

Permalink
changed default initializtion for mixSQP
Browse files Browse the repository at this point in the history
  • Loading branch information
stephens999 committed Feb 18, 2020
1 parent fe9680c commit 082b660
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/ash.R
Expand Up @@ -369,6 +369,10 @@ ash.workhorse <-
k = length(mixsd)
prior = setprior(prior, k, nullweight, null.comp)
pi = initpi(k, length(data$x), null.comp)
if(optmethod=="mixSQP"){ # we found that using a constant initialization for mixSQP works better than
#initpi, which was aimed at initializing EM algorithm
pi = rep(1,k)
}

if (mixcompdist == "normal")
g = normalmix(pi, rep(mode, k), mixsd)
Expand Down

0 comments on commit 082b660

Please sign in to comment.