Homework Problem 4, STAT 705, Fall 2015. Assigned 9/16/2015, Due Monday 9/28/2015 (a) Write a function "SimData" with the following inputs and outputs: INPUTS: xvec = either NULL (the default) or a fixed numeric vector (of arbitrary length) simx = vector of (mean,sd,length) parameters for a normally distributed SIMULATED vector xvec , to be used in case xvec is NULL errscal = error standard deviation to be used in simulating yvec coef = vector with 2 components (intercept,slope) to be used in simulating yvec OUTPUT: a list containing all the (named) components xvec, simx, errscal, coef from the INPUTs, together with a component yvec which is a vector of the same length as xvec , simulated to follow an Exponential distribution with hazard rate-parameter lambda[i] (reciprocal of mean) of yvec[i] equal to log(lambda[i]) = coef[1] + coef[2]*xvec[i] + errscal*epsilon[i] where epsilon is a vector with pseudo-random independently identically logistic-distributed entries vector of the same length as xvec, with mean 0 and scale-parameter 1. (b) Test your function in creating some datasets of moderately large size (say, 300), and show that it is working properly by calculating some appropriate summary statistics (means, covariances, residuals, histograms or whatever: the choice is yours). The working R lines and outputs for part (b) are restricted to 1/2 page AT MOST. You should submit a few clearly written lines of text to explain what you are calculating and why it indicates that the simulated-exponential-data function is working. You may also submit up to two R-generated pictures if you think that is a more efficient way to show the properties of your generated data.