Question
Suppose the following R-code can use to to generate a series with trend, quarterly seasonal component and noise: set.seed(7182) season.effect=c(-30,-15,80,-20) sea.com=rep(season.effect,30) t=1:100 trend=-5+0.5*t+0.02*(t?2) noise=rnorm(60,0,15) data=trend+sea.com+noise
Suppose the following R-code can use to to generate a series with trend, quarterly seasonal component and noise:
set.seed(7182) season.effect=c(-30,-15,80,-20) sea.com=rep(season.effect,30) t=1:100 trend=-5+0.5*t+0.02*(t?2) noise=rnorm(60,0,15) data=trend+sea.com+noise ts.plot(data) In the following part (a) and (b), you may artibrary to assume the number of iterations and the size of a matrix (a)Write the R-code so as to estimate the trend, season and noise terms. ( you may conside the filter is (1/3,1/3,1/3) . (b)Write the R-code so as to have three times of differencing. (c) According to your experience, what criteria you will adopt in order to determine the number of differencing so that a stationary sequence is obtained.
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