New version page

Montclair ECON 101 - Project 2

Documents in this Course

5 pages

6 pages

10 pages

3 pages

13 pages

Unformatted text preview:

David Maneiro11/4/19Project 21)General National Income has an upward trend but does not seem to have any seasonality effect.2)Looking that the additive and multiplicative decomposition results we see that the graph is supported by the decompositions as we can see there is an upward trend and the seasonal keeps reverting back to the mean.Looking at the seasonal component of the multiplicative decomposition we see that the GeneralNational Income has very minor if any seasonality effect, in Q1 it is slightly above the trend, is Q2 and Q3 it is slightly below and in Q4 it is slightly above. Due to the minor effect of these number we do not observe them as significant.Looking at the seasonal component of the additive decomposition we see that the General National Income has very minor if any seasonality effect, which we already saw in the multiplicative decomposition results. in Q1 it is slightly above the trend, is Q2 and Q3 it is slightly below and in Q4 it is slightly above. In Q1 it higher by 7 billion dollars, Q2 lower by 9.36 billion dollars, Q3 lower again by 1.50 billion dollars, and in Q4 it is higher by 3.85 billion dollars.3)Looking at the ACFs and the box tests for the remainders we see that you can use both additive and multiplicative decomposition for General National Income.However when looking at the results of the RSME we see that multiplicative decomposition is the better of the two options.data=read.csv(file.choose(), header=TRUE)library(ggplot2)library(forecast)library(tseries)library(TSA)GNI=ts(data\$GNI, frequency=4, start = c(2004,04))autoplot(GNI)+xlab("Year") + ylab("GNI")#General National Income has an upward trend but does not seem to have any seasonality effect.deGNI1 = decompose(GNI, type="multiplicative")deGNI2 = decompose(GNI, type="additive")plot(deGNI1)plot(deGNI2)s1=deGNI1\$seasonalr1=deGNI1\$randoms2=deGNI2\$seasonalr2=deGNI2\$randomplot(s1)plot(r1)plot(s2)plot(r2)s1r1s2r2ggAcf(s1)ggAcf(r1)ggAcf(s2)ggAcf(r2)Box.test(s1)Box.test(r1)Box.test(s2)Box.test(r2)r1 =r1[3:59]r2 =r2[3:59]rmse1= sqrt((sum(r1^2))/59)rmse2= sqrt((sum(r2^2))/59)rmse1rmse2#for rmse pick the lowest one#multiplicative: at 1 on trend above 1 above trend below 1 below trend numbers after decimal point show by how much percent up or down.#additive: actual data show actually how higher or lower you are compared to the

View Full Document