Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
BNF 0.32 KB | None | 0 0
  1. loglikelihood <- function(lambda.hat){
  2.         S <- dpois(y, lambda.hat, log=TRUE)
  3.         sum(S)
  4. }
  5. plot(x=lambda, loglikelihood, type='o', main = "Estimate of lambda",
  6.      xlab="lambda", ylab = "log-likelihood")
  7. abline(v=lambda[which.max(loglikelihood)], col="red")
  8. text(1.8, -7.0, labels=lambda[which.max(loglikelihood)])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement