Question

Problem 3 Explore the correlation structure of the following models, by simulating their realizations of 500 observations and computing ACFs and PACFs. Comment on how these cut off.I also need an R code for this problem

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

Run the code below in R:

rm(list = ls())
set.seed(1001)
nn <- 500
z <- rnorm(nn+2)
x <- numeric(nn+2)
for(i in 3:(nn+2)){
x[i] <- 0.7*x[i-1] - 0.5*x[i-2] + z[i]
}
x <- x[-c(1:2)]
acf(x)
pacf(x)

z <- rnorm(nn+2)
x <- numeric(nn+2)
for(i in 3:(nn+2)){
x[i] <- -0.3*z[i-2] + 0.7*x[i-1] + z[i]
}
x <- x[-c(1:2)]
acf(x)
pacf(x)

Add a comment
Know the answer?
Add Answer to:
I also need an R code for this problem Problem 3 Explore the correlation structure of...
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
  • i need the excel formula 3. Write either the R code or Excel formula that gives...

    i need the excel formula 3. Write either the R code or Excel formula that gives us the answer to the following question. We are testing a one-tailed test, with all 5% of our critical value on the left-hand side of the distribution. What raw score value marks the critical value of this test, if the mean of the distribution is 500 and the standard deviation is 100? Paste the code in the Word file. 3. Write either the R...

  • Need R code for b Thanks ! In this first question, we explore the utility of...

    Need R code for b Thanks ! In this first question, we explore the utility of Bayes' theorem by examining the effectiveness of a recent egg recall. Over a 3-month period in 2010, 550 million eggs were recalled due to possible salmonella contamination out of a total 17.5 billion eggs produced in the US during that period. A risk assessment performed by the USDA several years back found that the baseline probability of salmonella contamination in eggs is about 1/100,000....

  • Please I need the R program code: in part b How to find the table in...

    Please I need the R program code: in part b How to find the table in R program? pulaiuit nvesligaieu wItH Fespect to the estimate of 1 In the assumed model. B. A test is to be run on a given process for the purpose of determining the effect of an independent variable X (such as process emperature) on a certain characteristic property of the finished product Y (such as density). Four observations are to be taken at each of...

  • Please answer this question in both mathematically and with R. I need R code also.. Its...

    Please answer this question in both mathematically and with R. I need R code also.. Its urgent... 3.14 For the variables in Table 3.4, define z 3y1 y2 2y3 (3,-1,2)y. Find z and sz in two ways: (a) Evaluate z for each row of Table 3.4 and find Z and s directly from 21,22,., 210 using (3.1) and (3.5). (b) Use za'y and s2- a'Sa, as in (3.54) and (3.55). The sample mean of a random sample of n observations...

  • I need to know the code to do this question in R thanks 10. (8 marks)...

    I need to know the code to do this question in R thanks 10. (8 marks) (using dataset: "meap93", in R: data(meap93, package-'wooldridge)) We want to explore the relationship between the math pass rate (scil/) and average teachers' compensation (salary + benefits) in the school (totcomp) In the population model: scill,-β0 + βι log(totcompi-u, prove that β/ 10 is the percentage point change in scill given a 10% increase in totcom. ii Use the data in MEAP93 to estimate the...

  • Hi I need the R code of the the below problem from Introducing Monte Carlo Methods...

    Hi I need the R code of the the below problem from Introducing Monte Carlo Methods with R: Exercise 2.2 Two distributions that have explicit forms of the cdf are the logis- tic and Cauchy distributions. Thus, they are well-suited to the inverse transform method. For each of the following, verify the form of the cdf and then generate 10,000 random variables using the inverse transform. Compare your program with the built-in R functions rlogis and rcauchy, respectively e-(x-μ) /...

  • I need help modifying this python code: a) I need to take 2 attributes of the...

    I need help modifying this python code: a) I need to take 2 attributes of the data as int - (columns (3 & 5) of my data) b) I need to take 2 more attributes as floats -(columns 4&6 of my data) c) I need to take 1 attribute as string (column 16 of my data) How would I modify this code # # Initial version - "standard programming" # # Define a list for the data. The data structure...

  • Please explain your work so I can replicate it and practice. Please also include R code,...

    Please explain your work so I can replicate it and practice. Please also include R code, not just R outputs. Thank you. 2, (3 points) Let X be a standard normal random variable. Let Y = X2. (Use R and give code.) (a) Find P(-1.5 < X < 2.5) (b) Find P(Y1 Notes: . You are not expected to and don't need to figure out the distribution of Y. Just convert the probability for Y to a probability involving X...

  • code: 3. (20 pts.) Consider the following fragment of for (i-0; i<=100; i-i++) { a [i]...

    code: 3. (20 pts.) Consider the following fragment of for (i-0; i<=100; i-i++) { a [i] = b[i] + c; Assume that a and b are arrays of words and that the base address of a is in Sao and the base address of b is in Sal. Register St0 is associated with variable i and register $so with the value c. You may also assume that any address constants you need are available to be loaded from memory. Make...

  • Please include all code from R that was used to calculate everything. Problem 2 (0.5 x...

    Please include all code from R that was used to calculate everything. Problem 2 (0.5 x 3 = 1.5 point ) Simulate a sample of y1, ..., 4100 from a simple linear model Y = 1 + 2x + €, where € ~ N(0,62), and x is an arithmetic sequence from 1 to 100, with a step size of 1. Run set.seed(1) to set the seed of R's random number generator so that the simulation can be reproduced. • Make...

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