I want to find ML estimates of a model using mle2 in bbmle package. When I insert new parameters (for new covariates) in model the log-likelihood value does not change and the estimated value is exactly the initial value that I determined.
What's the problem?
This is the code and the result:
library(GB2)
library(bbmle)
lgb1=function(a,b0,b2,b3,b4,p,q){
xb=b0+b2*fsex1[,2]+b3*fvtype1[,2]+b4*fvuse1[,2]
ll=sum(log(dgb2(loss1,a,exp(xb),p,q)))
return(-ll)
}
start=list(a=3.1,b0=2.5,
b2=.2,b3=1,b4=-.5,
p=7.2,q=.3)
mle2(lgb1,start)->fit1
summary(fit1)
Maximum likelihood estimation
Call:
mle2(minuslogl = lgb1, start = start)
Coefficients:
Estimate Std. Error z value Pr(z)
a 3.0747e+00 6.4741e-01 4.7492e+00 2.042e-06 ***
b0 2.5327e+00 4.6887e-01 5.4016e+00 6.605e-08 ***
b2 2.0000e-01 3.9686e-11 5.0396e+09 < 2.2e-16 ***
b3 1.0000e+00 7.6565e-12 1.3061e+11 < 2.2e-16 ***
b4 -5.0000e-01 1.5312e-11 -3.2653e+10 < 2.2e-16 ***
p 7.1281e+00 8.0269e+00 8.8800e-01 0.3745
q 3.5098e-01 8.6902e-02 4.0388e+00 5.372e-05 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-2 log L: 10137.56
As you see the estimated values for b2 , b3 and b4 are the initial values of them.
The log-likelihood value did not change!