Method of Moments

# Method of Moments - Estimation of the Gamma Function Lecture XIXB x e f x = L x1 x2 xn)= x-1 1 n n x e i=1 xi-1 i 1 n ln L x1 x2 xn = n ln n ln 1

This preview shows pages 1–5. Sign up to view the full content.

Estimation of the Gamma  Estimation of the Gamma  Function Function Lecture XIXB

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Estimate the gamma distribution using  Estimate the gamma distribution using  maximum likelihood: maximum likelihood: ( 29 ( 29 ( 29 ( 29 ( 29 ( 29 ( 29 ( 29 ( 29 ( 29 ( 29 ( 29 1 1 1 2 1 1 2 1 1 , 1 , , , 1 ln , , , ln ln 1 ln i x n x n i n i n n n i i i i x e f x L x x x x e L x x x n n x x α θ α θ - - - - = = = = Γ = Γ ÷ = - Γ - + - -
Note that if we define two statistics ( 29 1 1 2 1 ln n i i n i i T x T x = = = =

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
R-Code for Maximum Likelihood R-Code for Maximum Likelihood dta <- read.table("Gamma Data 2007.dta") t1  <- sum(dta) t2  <- sum(log(dta)) fr <- function(b) { nrow(dta)*lgamma(b[1])+nrow(dta)*b[1]*log(b[2]) -                     (b[1]-1)*t2+1/b[2]*t1 } gfr <- function(b) { cbind(nrow(dta)*digamma(b[1]) +nrow(dta)*log(b[2])-t2,                            nrow(dta)*b[1]/b[2]-1/b[2]^2*t1) } res <- optim(c(1.0,1.0),fr,gfr,method="BFGS")
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 07/18/2011 for the course AEB 6933 taught by Professor Carriker during the Fall '09 term at University of Florida.

### Page1 / 10

Method of Moments - Estimation of the Gamma Function Lecture XIXB x e f x = L x1 x2 xn)= x-1 1 n n x e i=1 xi-1 i 1 n ln L x1 x2 xn = n ln n ln 1

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online