stephenslab / mixsqp

R package for fast maximum-likelihood estimation of mixture proportions using SQP.
https://bit.ly/2NtYHWT
Other
11 stars 7 forks source link

Handle likelihood matrices with a single column. #20

Closed willwerscheid closed 5 years ago

willwerscheid commented 5 years ago

It can happen that ashr estimates a prior with one mixture component only. In flashr, I am experimenting with warmstarts using the previous estimate. So ashr tries to pass a likelihood matrix with a single column to mixsqp and gets an error. Error in verify.likelihood.matrix(L) : Input argument "L" should be a numeric matrix with >= 2 columns, all its entries should be non-negative, finite and not NA, and some entries should be positive

I think that if “L” has one column then mixsqp should just return the trivial solution.

pcarbo commented 5 years ago

@willwerscheid Done---but matrices with zero columns are not allowed!

willwerscheid commented 5 years ago

@pcarbo Great, thanks!