Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can I hvae help with this is R This is all the information we get versus M, and P, 4. 2.3 In this problem, we

can I hvae help with this is R

This is all the information we get image text in transcribed

image text in transcribed

versus M, and P, 4. 2.3 In this problem, we explore the difference between a random walk and a trend stationary process. (a) Generate four series that are random walk with drift, (1.4), of length n = 100 with 8 = .01 and ow = 1. Call the data x, for t = 1,...,100. Fit the regression X = Br + w, using least squares. Plot the data, the true mean function (i.e., H = .011) and the fitted line, f = Bt, on the same graph. Hint: The following R code may be useful. Problems 73 par(mfrow=c(2,2), mar=c(2.5,2.5,0,0)+.5, mgp=c(1.6..6,0)) # set up for (i in 1:4){ x = ts(cumsum(rnor (100,.01,1))) # data regx = 1m(x-@+time(x), na.action-NULL) # regression plot(x, ylab="Random Walk w Drift') # plots abline(a=0,b=.01, col=2, 1ty=2) # true mean (red - dashed) abline(regx, col-4) # fitted line (blue - solid) (b) Generate four series of length n = 100 that are linear trend plus noise, say y = .011 + wc, where t and w, are as in part (a). Fit the regression yr = Bt + w; using least squares. Plot the data, the true mean function (i.e., My = .011) and the fitted line, 9, = B1, on the same graph. (c) Comment (what did you learn from this assignment)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Hands-On Database

Authors: Steve Conger

2nd Edition

0133024415, 978-0133024418

More Books

Students also viewed these Databases questions