Answered step by step
Verified Expert Solution
Link Copied!

Question

...
1 Approved Answer

(2) The negative binomial distribution can be generalised for r E (0, co) (ie. non- integer values) by expressing the choose function in terms of

image text in transcribed
(2) The negative binomial distribution can be generalised for r E (0, co) (ie. non- integer values) by expressing the choose function in terms of gamma functions: r(k +r) f (k |r, P) = r(k + 1)I(r) p* (1 - p)". Here k is a non-negative integer. Consider iid X1, ..., X100 ~ NBin(r, p). There is no closed-form expression for the MLE of (r, p). (a) Write R code to calculate the negative log-likelihood for (r, p), given values of X1, ..., X100. (Hint: Use the R function debinom with size = r and prob = 1 - p.) (b) Write R code to generate values of X1, ..., Xion with r = 2 and p = 0.8. Evaluate MLE estimates (r, p) numerically using the mle function in the stats4 package. (c) Simulate 1000 such data sets and evaluate MLE estimates of (r, p) for each one. Summarize your results with a scatterplot of points (r, p) and separate histograms for r and p

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

9781285586618

Students also viewed these Mathematics questions