Question

Time series analysis

2. Set n 100 and generate and plot the time series xt 2 cos(2π.06t) + 3 sin(2π.06t) Ý,-4 cos(2n. 10t) + 5 sin(2m10) z, 6 cos(

(a) Use the periodogram function in R to plot the periodogram of Vi. Can you explain the spikes? (b) Now let wi ~ N(0, 25) be

2. Set n 100 and generate and plot the time series xt 2 cos(2π.06t) + 3 sin(2π.06t) Ý,-4 cos(2n. 10t) + 5 sin(2m10) z, 6 cos(2π·40t) + 7 sin(2π·40t)
(a) Use the periodogram function in R to plot the periodogram of Vi. Can you explain the spikes? (b) Now let wi ~ N(0, 25) be iid and plot the periodogram of the series V +w. Does it still pick out the periodic components?
0 0
Add a comment Improve this question Transcribed image text
Answer #1

The R- code for all both (a) and (b) is as follows

n<-100
xt<-rep(0,n)
yt<-rep(0,n)
zt<-rep(0,n)
vt<-rep(0,n)

for(i in 1:n)
{
xt[i]<-2*cos(2*pi*0.06*i)+3*sin(2*pi*0.06*i)
yt[i]<-2*cos(2*pi*0.06*i)+3*sin(2*pi*0.06*i)
zt[i]<-2*cos(2*pi*0.06*i)+3*sin(2*pi*0.06*i)
vt[i]<-xt[i]+yt[i]+zt[i]
}
ts.plot(xt)
ts.plot(yt)
ts.plot(zt)
ts.plot(vt)

spectrum(vt)

#Let at=wt+vt, where wt ~ N(0,25)
at<-vt+rnorm(n,0,5)
spectrum(at)

The time series plots for xt, yt, zt, vt are as follows

CN 0 20 40 60 80 100 TimeCN 0 20 40 60 80 100 TimeCN 0 20 40 60 80 100 Time20 40 60 80 100 0 Time

The periodogram for series Vt is obtained as

Series: x Raw Periodogram 0.0 0.1 0.2 0.3 0.4 0.5 frequency bandwidth 0.00289

For the series Vt + Wt, where Wt ~ N(0,25) the periodogram is obtained as -

Series: x Raw Periodogram 0.0 0.1 0.2 0.3 0.4 0.5 frequency bandwidth 0.00289

Add a comment
Know the answer?
Add Answer to:
2. Set n 100 and generate and plot the time series xt 2 cos(2π.06t) + 3 sin(2π.06t) Ý,-4 cos(2n. ...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT