Question: i need help with r coding with regards to Negative binomial distribution. For this question please help with c d and e. (1] Suppose X

i need help with r coding with regards to Negative binomial distribution. For this question please help with c d and e.

i need help with r coding with regards to Negative binomial distribution.

(1] Suppose X N NBinI[2,p). (a) Show the MLE for p, based on a single observation X, is 33 t: X/(2 + X). [b] Write an R function to compute the log likelihood ratio where a: E {0&11 . . .}, and pg E ([1, 1). Take special care to correctlyr return the value of this function when m = [1. Plot this function for 33.3. = [L9, remembering that I can ooh,r take integer values. (o) Write an R function to compute the size of a Ill-test for ill-[g : p = 199 versus S'fg : 33 3E pg with the critical region C={IE{D,1,...}:h(s}:>K} for a given If. Plot this size against K E [0, 4]. (d) Use the function from part (c) to determine the critical region C correspond- ing to a size threshold of o: = 0.05 for the above test. (e) Write an R function to compute the power for the above test and present a plot of power versus 33. Comment on how the minimum of this function relates to the size of the test

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!