A wrapper around `disclapmix()` that tries to avoid errors. Can sometimes avoid errors with SVD problems happening with `glm_method = 'internal_coef'` and `glm_method = 'internal_dev'`.
disclapmix_robust(x, clusters, ...)
Dataset.
The number of clusters/components to fit the model for.
Passed on to `disclapmix()`
data(danes)
db <- as.matrix(danes[rep(1:nrow(danes), danes$n), 1:(ncol(danes)-1)])
fit <- disclapmix_robust(db, 3L)
fit
#> disclapmixfit from 185 observations on 10 loci with 3 clusters.
#>
#> EM converged: TRUE
#> Number of central haplotype changes: 0
#> Total number of EM iterations: 10
#> Model observations (n*loci*clusters): 1850
#> Model parameters ((clusters*loci)+(loci+clusters-1)+(clusters-1)): 44
#> GLM method: internal_coef
#> Initial central haplotypes supplied: FALSE
#> Method to find initial central haplotypes: pam