##Normal log likelihood estimation of mu.
X<-c(11.2,10.8,9.0,12.4,12.1,10.3,10.4,10.6,9.3,11.8)
mean(X)
possibilities.mu<-seq(8,14,.01)
loglik.norm.plot(X,parameter="mu",possibilities.mu)
##Normal log likelihood estimation of sigma squared.
X<-c(11.2,10.8,9.0,12.4,12.1,10.3,10.4,10.6,9.3,11.8)
var(X)
possibilities.var<-seq(1,1.45,.001)
loglik.norm.plot(X,parameter="sigma.sq",possibilities.var)
##Exponential log likelihood estimation of theta
X<-c(0.82,0.32,0.14,0.41,0.09,0.32,0.74,4.17,0.36,1.80,0.74,0.07,0.45,2.33,0.21,
0.79,0.29,0.75,3.45)
possibilities.exp<-seq(.7,1.3,.0001)
loglik.exp.plot(X,possibilities.exp)
##Poisson log likelihood estimation of lambda.
X<-c(1,3,4,0,2,3,4,3,5)
mean(X)
possibilities.poi<-seq(2.7,2.83,.001)
loglik.pois.plot(X,possibilities.poi)
##Binomial log likelihood estimation of p.
X<-c(1,1,0,0,0,1,0,0,0,0)
mean(X)
possibilities<-seq(.2,.4,.01)
loglik.binom.plot(X,possibilities)
Run the code above in your browser using DataLab