Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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: T(k+r) f ( k|r, p) = T(k + 1)I(r) p* (1 - p). Here & is a non-negative integer. Consider iid X1, ..., Xion ~ 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, ..., Xion. (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 f and p

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

A First Course In Discrete Mathematics

Authors: John C Molluzzo, Fred Buckley

1st Edition

1478634383, 9781478634386

More Books

Students also viewed these Mathematics questions

Question

Tim X700 2 49-x 2-16 x -16 X

Answered: 1 week ago

Question

6. How can a message directly influence the interpreter?

Answered: 1 week ago