why do I get zero likelihood!
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying to use fmincon for optimizing my likelihood, but while I get the solutions the log likelihhod is zero and two of the parameters are equal to the specified initial values.
2 Commenti
Risposta accettata
Tom Lane
il 9 Apr 2013
Are you using the Statistics Toolbox mle function in combination with the Optimization Toolbox fmincon function? Can you try computing the pdf of your data using your initial parameter values, to make sure the pdf is positive for each data point?
One trick may be to make the distribution more diffuse as opposed to more concentrated. In the following example, the first mle invocation is successful using sigma=exp(3). The second fails using sigma=exp(0), because the data points are too far out in the tails of the normal distribution with mean 20 and standard deviation exp(0)=1.
x = randn(100,1);
mle(x,'pdf',@(c,mu,logs)normpdf(x,mu,exp(logs)),'start',[20 3],'optimfun','fmincon')
mle(x,'pdf',@(c,mu,logs)normpdf(x,mu,exp(logs)),'start',[20 0],'optimfun','fmincon')
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!