Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2. Implement bootstrap procedure for AR(I) time series models. AR(I) is of the form xt = oxt_l + Et, where {Et} is a sequence
2. Implement bootstrap procedure for AR(I) time series models. AR(I) is of the form xt = oxt_l + Et, where {Et} is a sequence of iid errors with mean 0 and variance 02. A least estimator of 9 is Do the following steps to implement the bootstrap inference for 0. No looping is allowed except (a) Write a function theta.est with argument a: to compute 0, where is the vector of observations. Notice that Xn = 0 is assumed in the formula. Test your function with (open the dataset huron.R in owl and copy/paste into R to create an object huron) and save the result to my.est. (b) Use the centered huron data and its theta estimator my.est from (a) to compute the residuals and save the sample mean centered residuals E, , to a vector my.resid, where is the mean of thcxse t. Check the distribution of my.resid by its histogram or density and qqnorm (qqline) and comment your findings. (c) Write a function one.boot with arguments eps=my.resid and theta=my.est to compute one bootstrap estimation of 9. The procedures are i. Resample eps with replacement to get a vector called eps.star 1, (assume that rd = 0). ii. Compute = t iii. Compute and return the least estimator based on . theta.est from (a). . , by calling the function Test your function with default values to see if it works and test again to see if a different value is produced. Then run 10000 bootstraps (using replicate with one. boot) to produce a vector output. (d) Use the output from (c) to find the histogram or density curve of and comment your findings. Then construct 95% confidence interval for 0. You need to use the fact that 0 _ in distribution. Notice that this inference is for the huron time series only.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started