dm13450/dirichletprocess

wrong number of dimensions from LikelihoodDP()

Closed this issue · 2 comments

Hi everybody,

first let me thank you for the very nice package!

In the LikelihoodDP() function code it is stated that the likelihoodValues object should be an "n x k matrix". However, while using the package, I noticed that this does not seem to be true. I used it with the following simple example, which I debugged line by line:

library(dirichletprocess)

set.seed(1406)
n <- 10
y <- rt(n, 3) + 2

g0Priors <- c(0, 1, 1, 1)
alphaPriors <- c(2, 4)

mdobj <- GaussianMixtureCreate(g0Priors)
dpobj <- DirichletProcessCreate(y, mdobj, alphaPriors)
dpobj <- Initialise(dpobj)

debugonce(Fit)
dp <- Fit(dpobj, 10)

My guess is that the Likelihood.normal() function uses a definition of the parameters that is not appropriate (their values are replicated according to some rules that do not appear to be the right ones).

Is there any chance that you check it and get back with a response? I would like to use the package for my research, but I need to be sure that it provides the right numbers.

Thanks in advance for your answer.

Sergio

Hey thanks for raising this, I can replicate the issue and will get it fixed.

Fixed in the latest release