Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION: 1. Use the Maximum Likelihood method to estimate the parameters Kappa and Theta 2. Show that we cannot reach an analytical solution for the

image text in transcribed

QUESTION:

1. Use the Maximum Likelihood method to estimate the parameters "Kappa" and "Theta"

2. Show that we cannot reach an analytical solution for the maximum likelihood estimates

3. Write a function in "r" call it "NR.gam" that applies the Newton Raphson method to estimate the parameters "Kappa" and "Theta" using n = 100 observation generated by the above code. Set your initial values to be kappa_0 = sqrt(mean(y)) and theta_0 = sqrt(mean(y)). Use the convergence threshold eps = 1e-6 and max.iteration = 10000.

3. Recall that the porbability density function (pdf) of the Gamma distribution with shape parameter k and scale parameter 2 is given by f(y, k, ) = TG -y-le ey-1 ;y >0; k, 2 > 0 Use the following code to generate n=100 observations from the gamma distribution with parameters (kappa-2, theta=3): set.seed (10) n=100 kappa=2 theta=3 y = rgamma in, shape=kappa, scale=theta) Use the maximum likelihood method to estimate the parameters k and 0. Show that we cannot reach an analytical solution for the maximum likelihood estimates. Then, write a function (call it NR.gam ) that applies the Newton-Raphson method to estimate the parameters k and using the n=100 observations generated by the above code. Set your initial values to be kappa_0=sqrt (mean(y)) and theta_0-sqrt (mean (y)). Use convergence threshhold eps-le-6 and max. iter=10000 3. Recall that the porbability density function (pdf) of the Gamma distribution with shape parameter k and scale parameter 2 is given by f(y, k, ) = TG -y-le ey-1 ;y >0; k, 2 > 0 Use the following code to generate n=100 observations from the gamma distribution with parameters (kappa-2, theta=3): set.seed (10) n=100 kappa=2 theta=3 y = rgamma in, shape=kappa, scale=theta) Use the maximum likelihood method to estimate the parameters k and 0. Show that we cannot reach an analytical solution for the maximum likelihood estimates. Then, write a function (call it NR.gam ) that applies the Newton-Raphson method to estimate the parameters k and using the n=100 observations generated by the above code. Set your initial values to be kappa_0=sqrt (mean(y)) and theta_0-sqrt (mean (y)). Use convergence threshhold eps-le-6 and max. iter=10000

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students also viewed these Databases questions