Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a0 = 1.5; a1 = 0.4; b1 = 0.3; g1= 0.7
- nu = rep(0,1)
- h.new = rep(0,1)
- ddp = rep(0,1)
- nu[1]=0
- h.new[1] = a0/(1-a1-b1)
- ddp[1] = 0.5*log(g1)- g1*h.new[1] +
- nu[1]*(log(nu[1])-1) - log(factorial(nu[1]))+(g1)*nu[1]*
- (1+log(h.new[1]/nu[1]))
- ###> ddp
- ###[1] NaN
- ###h.new = 1.5/(1-0.4-0.3) = 5
- ###ddp
- ###= 0.5*log(0.7)- (0.7)*(5) +
- ###(0)*(log(0)-1) - log(0!)+(0.7)*(0)*
- ###(1+log(5/0))
- ###= 0.5*log(0.7)- (0.7)*(5)
- ###= -0.528333
- term3 <- if (nu==0) 0 else 0*(log(0)-1)
- term5 <- if (nu==0) 0 else g1*nu*(1+log(h.new/nu))
- ddp = 0.5*log(g1)-
- g1*h.new +
- term3 -
- log(factorial(nu))+
- term5
Add Comment
Please, Sign In to add comment