Homework 10, Due Friday Oct. 16, 2009. ====================================== Generate a 1000-observation dataset HW10Data using the command: > HW10Data = rlogis(1000, runif(1,2,2.5), runif(1,.7,.85)) This gives a pseudo-random sample of size 10000 from a logistic distribution with location parameter A and scale-parameter B, which are unknown parameters, and which you are to estimate by numerical maximi- zation of a (misspecified) logistic log-likelihood. (For the sake of good starting values, you may use the fact that the true parameter values fall in the interval (2,2.5) for A , and (.7,.85) for B. Your task in this exercise is to find the Maximum Likelihood Estimators and Standard Errors for the location parameter A and scale-parameter B, treating your data as though they came from a logistic density dlogis((x-A)/B)/B . Do this by setting up a direct numerical maximization using nlm. First do it without providing "gradient" and "hessian" attributes, and then do it again providing these attributes coded as efficiently as you can. Do "unix.time" timing runs both ways, to compare the computing time with and without analytical gradient and hessian. (b) Also do the minimization by the "optim" function, and by a direct Gradient search using the same log-likelihood function (using your same analytical gradient function), and do a "unix.time" timing run on it. NEEDLESS TO SAY, YOUR DIFFERENT MAXIMIZATION ROUTINES SHOULD ALL REACH THE SAME MAXIMUM !!