search for: kbll2

Displaying 2 results from an estimated 2 matches for "kbll2".

2012 Jul 17
0
Maximum Likelihood estimation of KB distribution
...()*, I first declared the Negative Log-likelihood of this distribution as follows; *Loglik.newdis2<-function(x,a,b,n,imax) { term<-0 for (i in 0:imax) { term=term+(((-1)**i)*(choose(b-1,i))*(beta(x+a+a*i,n-x+1))) } dens=a*b*choose(n,x)*term KBLL2<-sum(log(dens)) return(-KBLL2) } * since there is an infinite convergent series in this PMF, I decided to specify a maximum value as imax instead of infinity without loss of any information, and n is the binomial trials. Please tell me whether the declared negative loglikelihoo...
2012 Jul 11
0
declaring negative log likelihood of a distribution
...a large number like 1000 is defined as the maximum #with for loop *>Loglik.newdis2<-function(x,a,b,fre,n,imax) { term<-0 for (i in 0:imax) { term=term+(((-1)**i)*(choose(b-1,i))*(beta(x+a+a*i,n-x+1))) } dens=a*b*choose(n,x)*term KBLL2<-sum(fre*log(dens)) return(-KBLL2) } * #Now to estimate the parameters, I used http://rgm2.lab.nig.ac.jp/RGM2/func.php?rd_id=bbmle:mle2 mle2(from the package bbmle) , which is a wrapper around the optim function *>estimates1=mle2(Loglik.newdis1, start=list(a=1,b=1), da...