Displaying 1 result from an estimated 1 matches for "qbmle".
Did you mean:
bbmle
2009 Feb 28
0
Implementation of quasi-bayesian maximum likelihood estimation for normal mixtures
...ues
sigma_n and sigma_b. My priors are already included in the code below. I
intend to try a mixture of two normal distributions with same mean, and
variances 1 and 5 as starting values.
This is what I've done so far:
> R <-read.table("C:\\...\\rendite.txt", header=F)
> qbmle <- function(p, data){
mu <- mean(data);
(-sum(log(p[1]/p[2]*exp(-0.5*(data-mu)^2/p[2]^2)+(1-p[1])/p[3]*exp(-0.5*data^2/p[3]^2)))-2.772*log(p[2]^2)-2.772*log(p[3]^2)
- 2.772/p[2]^2 - 13.86/p[3]^2 )}
> start <-c(0.9, 1, 5)
> out <- nlm(qbmle, start, data=R)
The result is...