STAT8178: Statistical Computing - MLE With Newton-Raphson - Statistics Assignment Help

Download Solution Order New Solution
Assignment Task:

General instructions 
For each of the questions below, you are expected to document your answer fully. Try to work within scripts or functions, rather than issuing commands at the command line, or manually manipulating spreadsheets, so as to leave a repeatable record of what you’ve done. If you do decide to manipulate data manually, please fully describe what you’ve done in your assignment submission, and submit any files (such as manipulated spreadsheets) that may clarify your work.
 
Where you are required to write code, please state and interpret the output, as well as submitting the code itself. 

Also, some of your answers should be mathematical expressions. The best way to write these is LATEX, but it has a long learning curve and is probably not worth learning if you don’t expect to do much technical writing after this unit.
 
For convenience, the questions describe working with either Matlab or R. As always, if you believe you can do equivalent computations on a different platform to the one described, you are free to do so, and I am happy to discuss it if you’re not sure. Regardless of which programming language you’re using, you will probably need to look things up. You should freely use the built-in documentation and internet searches to learn the details of how to use each function or command that you need. 

Question 1: MLE with Newton-Raphson 
In this question, we will fit a seasonal model via maximum likelihood estimation. For health resources planning, the UK’s National Health Service keeps records of the use of its services, and much of this data is publicly available. The provided file

MLE with Newton-Raphson expression for the log-likelihood


(f) Express the gradient and Hessian of the log-likelihood using matrix algebra, in terms of X, y, μ and M.

(g) Choose a reasonable starting value for the parameter vector β, and explain your choice. (Nothing very sophisticated is required; we just need to be in the general vicinity of the best fit. Probably only a single non-zero entry is necessary.)

(h) Write a script in Matlab to 
• read the admissions data from the range K15: K155 of the provided Excel file (you’ll probably want to use the Matlab function misread); 
• construct the matrix X; 
• initialise the vector β; 
• perform iterations of the Newton-Raphson method until the estimated values μ are no longer changing very much; 
• output the resulting estimates for β. Comment your code thoroughly to explain its logic. Run this script and state and interpret the output.

Question 2: Posterior distribution after a single coin toss
 
In this question, we will produce a histogram of the posterior distribution of a coin’s tails probability after a single coin toss. 

In class, we discussed prior distributions in the context of a coin toss. Suppose someone you don’t know very well has a coin. You can’t see the coin very clearly; it’s too far away to see what’s on either side. In particular, it may be a genuine coin, but you don’t know that for certain. The coin is then tossed once and shown to you, and you can see that it shows tails.

(a) Describe and justify a prior distribution (i.e., prior to the single toss that you witnessed) for the parameter π, the coin’s probability of showing tails on a single toss. This is a matter of opinion, so the right answer is not unique, but the prior distribution should accurately describe a reasonable opinion.

(b) Use an appropriate Bayesian inference method to produce a histogram of your posterior distribution, after the single coin toss that you witnessed. (Hints: depending on your prior, this may or may not be straightforward in JAGS. Another option is rejection sampling. Also, you’ll probably need a large sample and narrow histogram bins to clearly display the posterior distribution.)


This STAT8178: Statistics Assignment has been solved by our Statistics Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.

Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.