Question

5. For the processes X 0.4X,-1 Zt -0.7Zi-1, (i) Simulate and plot 100 values of the processes; (ii) Compute and graph their t

0 0
Add a comment Improve this question Transcribed image text
Answer #1

SOLUTION

rm(list=ls())

# (a) For First process

# (i) Simulate and plot 100 values of the given process
# Initialoize values
x0<-0;z0<-0
x<-0;z<-0
for(t in 1:100)
{
z[t]<-rnorm(1,0,1) # Draw SN(0,1) random variable
x[t]=-0.6*x0+z[t]+1.2*z0 # Simulate one value of process
x0<-x[t]
z0<-z[t]
}
plot(1:100,x,xlab = "Number",ylab = "Simulated Values",main = "Graph of process 1","l")

# (a) For Second process
# Initialoize values
y1<-0;y2<-0
y<-0;z<-0
for(t in 2:100)
{
z[t]<-rnorm(1,0,1) # Draw SN(0,1) random variable
y[t]=-0.2*y1+0.48*y2+z[t] # Simulate one value of process
y1<-y[t]
y2<-y[t-1]
}
plot(1:100,y,xlab = "Number",ylab = "Simulated Values",main = "Graph of process 2","l")

########### (ii) theorectical ACF and PCAF using R


### (a) For Process 1

acf_1<-ARMAacf(ar=0.6,ma=1.2,lag.max=5)
# Theoretical ACF<-
# 0 1 2 3 4 5
# 1.0000000 0.7979381 0.4787629 0.2872577 0.1723546 0.1034128
pacf_1<-ARMAacf(ar=0.6,ma=1.2,lag.max=5,pacf=T)

# Theoretical PACF<-
# 1 2 3 4 5
# 0.7979381 -0.4347500 0.2920742 -0.2145219 0.1651622

### (a) For Process 2
acf_2<-ARMAacf(ar=c(0.2,-0.48),lag.max=5)
# Theoretical ACF<-
# 0 1 2 3 4 5
# 1.0000000 0.1351351 -0.4529730 -0.1554595 0.1863351 0.1118876

pacf_2<-ARMAacf(ar=c(0.2,-0.48),lag.max=5,pacf=T)
# Theoretical PACF<-
# 1 2 3 4 5
# 1.351351e-01 -4.800000e-01 3.673579e-17 -6.570475e-18 2.398725e-17


########## (iii) Sample ACF and PACF graph
# For Process 1
samp_acf_1<-acf(x,lag.max=20,main="ACF of process 1")
samp_pacf_1<-pacf(x,lag.max=20,main="PACF of process 1")

# For Process 2
samp_acf_2<-acf(y,lag.max=20,main="ACF of process 2")
samp_pacf_2<-pacf(y,lag.max=20,main="PACF of process 2")

Output: By using sample and theoretcial values of ACF and PACF, we can say that there is no any significance spike of ACF and PACF values for both process.

Simulated values plot and ACF, PACF graph are given below with clearly mentioning its axis lables,

Graph of process 1 (0D 0 20 40 60 80 NumberGraph of process 2 CN (0D 0 20 40 60 80 Number

ACF of process 1 C) CN CN 0 5 10 15 20 LagPACF of process 1 CN C) f1 CN 5 10 15 20 Lag

ACF of process 2 C) CN CN 0 5 10 15 20 LagPACF of process 2 CN f1 CN 5 10 15 20 Lag

Add a comment
Know the answer?
Add Answer to:
5. For the processes X 0.4X,-1 Zt -0.7Zi-1, (i) Simulate and plot 100 values of the processes; (ii) Compute and graph their theoretical ACF and PACF using R. (iii) Compute and graph their sample ACF...
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
  • Exercise 6,7,8, and 9 use data from exercise 5 for exercise 6. use data from the...

    Exercise 6,7,8, and 9 use data from exercise 5 for exercise 6. use data from the graph for 7,8,9 d. LY, for some integer k> 0 5. The following table contains quarterly nominal GDP in U.S. (billions of dol- lars). Let Y, denote the GDP at time t and let y, = ln (Y). (Show your calculations in a spreadsheet, e.g., in Microsoft Excel.) a. Plot the time series (Y). Can the underlying stochastic process be weakly b. Calculate the...

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